Skip to content

Instantly share code, notes, and snippets.

@mkdesignn
Created January 20, 2018 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkdesignn/b1e86ecc3a426205bb2e55bfef66cc3d to your computer and use it in GitHub Desktop.
Save mkdesignn/b1e86ecc3a426205bb2e55bfef66cc3d to your computer and use it in GitHub Desktop.
nginx.conf
server {
listen 185.13.231.188:500;
root /home/ftp_users/ftp/demo_core/public;
index index.php index.html index.htm;
server_name test.com;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
rewrite_log on;
location = /50x.html {
root /usr/share/nginx/www;
}
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
location ~ .php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_read_timeout 180;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment