Created
January 20, 2018 13:47
-
-
Save mkdesignn/b1e86ecc3a426205bb2e55bfef66cc3d to your computer and use it in GitHub Desktop.
nginx.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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