Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx erro #246

Open
ntnetx opened this issue Jun 27, 2018 · 3 comments
Open

nginx erro #246

ntnetx opened this issue Jun 27, 2018 · 3 comments

Comments

@ntnetx
Copy link

ntnetx commented Jun 27, 2018

I am having problem with nginx server is configured in the following way someone could help where is the error? friendly url does not work only works home page.

default.conf

server {
listen   80;
server_name  192.168.15.50;

# note that these lines are originally from the "location /" block
root   /home/sites;
index index.php index.html index.htm;

location / {
    index index.php;
try_files /$uri /$uri/ /index.php?url=$uri;
rewrite ^/(.*) /public/$1 break;        
}


error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
    root /home/sites;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
}

}

Home Page - OK
https://i.imgur.com/K9I229zl.jpg

Error
https://i.imgur.com/7Etr3wBl.jpg

Thank you.

@panique
Copy link
Owner

panique commented Jun 28, 2018

hi, have you changed something inside the default config ?

@ntnetx
Copy link
Author

ntnetx commented Jun 28, 2018

Hello
I am using Centos 7 the default configuration /etc/nginx/conf.d is configured so

default.conf

server {
listen 80;
server_name 192.168.15.50;

note that these lines are originally from the "location /" block

root /home/sites;
index index.php index.html index.htm;

location / {
index index.php;
try_files /$uri /$uri/ /index.php?url=$uri;
rewrite ^/(.*) /public/$1 break;
}

error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /home/sites;
}

location ~ .php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

I'm using the PHP 7.2 version follows the php information set up

http://189.47.168.190/info.php

The default folder that the site file is is / home / sites

Anything could help me if in case I pass the data ssh root from vps have any email I can send the access data?

@panique
Copy link
Owner

panique commented Jun 29, 2018

sorry i have no idea how centos works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants