Created
March 27, 2020 00:56
-
-
Save eaguad1337/aa0799e85ae82277291cc4025b7b7e81 to your computer and use it in GitHub Desktop.
nginx conf example
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 80; | |
server_name localhost; | |
root /home/www-data/salfa-maquinaria/htdocs; | |
charset utf-8; | |
error_log /var/log/nginx/salfa.cl-error.log error; | |
access_log /var/log/nginx/salfa.cl-access.log main; | |
index index.php; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 | |
# | |
location ~ \.php$ { | |
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; | |
} | |
# deny access to .htaccess files, if Apache's document root | |
# concurs with nginx's one | |
# | |
#location ~ /\.ht { | |
# deny all; | |
#} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment