ngnix показывает страницу не найдена - PullRequest
0 голосов
/ 08 февраля 2019

Я пытаюсь конвертировать мой .htaccess в nginx.conf, но я получаю 404 Not Found ngnix / 1.14.1.Я использовал wingix , здесь что-то не хватает?

enter image description here

Что мне не хватает, кто-нибудь может мне помочь, пожалуйста?

# nginx configuration 

error_page 404 https://www.address.com/sources/not-found.php; 
location / { 
   if ($request_method !~ "POST") { 
      rewrite ^(.*)$ /%1 redirect; 
   } 
   if ($request_method !~ "POST") { 
      rewrite ^/(.*)index\.php$ /$1 redirect; 
   } 
   if (-e $request_filename){ 
      rewrite ^/status/([\w-]+)/?$ /status.php?msgID=$1 break; 
   } 
    rewrite ^/(.+?)/?$ /$1.php break; 
} 

location /hashtag { 
    rewrite ^/hashtag/([^/]+)/?$ /hashtags.php?tag=$1 break; 
} 

location /settings { 
    rewrite ^/settings/([\w-]+)/?$ /settings.php?set=$1 break; 
} 

location /account { 
    rewrite ^/account/([\w-]+)/?$ /sources/index.php?get=$1 break;
} 

location /dashboard { 
    rewrite ^/dashboard/([\w-]+)/?$ /admin/index.php?set=$1 break; 
} 

location /profile { 
    rewrite ^/profile/([^/]+)/?$ /profile.php?username=$1 break; 
    rewrite ^/profile/(followers|friends|saved)/([^/]+)/?$ /$1.php?username=$2 break; 
}
...