-
-
Save ephrin/e856738d838b21396674236991890702 to your computer and use it in GitHub Desktop.
nginx server config for monolitic repo
This file contains hidden or 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 "~^(?<application>[a-zA-Z0-9_-]+)\.(?<folder>[a-zA-Z0-9_-]+)\.loc$"; | |
root /home/eprhin/ws/oro/$folder/application/$application/web; | |
#index app.php access_log /var/log/nginx/$host.access_log main; | |
error_log /var/log/nginx/monolitic.error_log info; | |
try_files $uri $uri/ @rewrite; | |
location @rewrite { | |
rewrite ^/(.*)$ /app.php/$1; | |
} | |
location ~ [^/]\.php(/|$) { | |
fastcgi_split_path_info ^(.+?\.php)(/.*)$; | |
if (!-f $document_root$fastcgi_script_name) { | |
return 404; | |
} | |
fastcgi_buffers 4 512k; | |
fastcgi_buffer_size 256k; | |
fastcgi_busy_buffers_size 512k; | |
fastcgi_index app.php; | |
fastcgi_read_timeout 60m; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param WEBSITE_ID ca; | |
include fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment