Skip to content

Instantly share code, notes, and snippets.

@khoa-le
Created October 20, 2015 03:50
Show Gist options
  • Save khoa-le/6e16d29bd6b40670ee10 to your computer and use it in GitHub Desktop.
Save khoa-le/6e16d29bd6b40670ee10 to your computer and use it in GitHub Desktop.
Symfony Nginx Config
server {
listen 8001;
server_name dev.employer.vietnamworks.com;
#charset utf-8;
#access_log /var/log/nginx/log/host.access.log;
error_log /var/log/nginx/error.log;
root /home/khoa/Projects/employerdashboard/web;
location / {
try_files $uri /app_dev.php$is_args$args;
}
location ~ ^/(app|app_dev|config)\.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
# 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