From f50bd7e8d0ad8818fc4435b59284ffe572cebf2a Mon Sep 17 00:00:00 2001 From: Alfred Date: Wed, 27 Feb 2019 19:20:02 +0500 Subject: [PATCH] #654. Testing nginx config for PWD. --- docker/nginx/vhost.conf | 100 +--------------------------------------- 1 file changed, 1 insertion(+), 99 deletions(-) diff --git a/docker/nginx/vhost.conf b/docker/nginx/vhost.conf index eb050a9b6..4664a79a3 100644 --- a/docker/nginx/vhost.conf +++ b/docker/nginx/vhost.conf @@ -1,32 +1,3 @@ -## API ## -server { - listen 80; - - root /app/api/web; - index index.php index.html; - - server_name api.yii2-starter-kit.localhost; - - charset utf-8; - - location / { - try_files $uri $uri/ /index.php?$args; - } - - client_max_body_size 32m; - - # There is a VirtualBox bug related to sendfile that can lead to - # corrupted files, if not turned-off - # sendfile off; - - location ~ \.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_pass php-fpm; - fastcgi_index index.php; - include fastcgi_params; - } -} ## FRONTEND ## server { @@ -35,7 +6,7 @@ server { root /app/frontend/web; index index.php index.html; - server_name yii2-starter-kit.localhost localhost; + server_name localhost; charset utf-8; @@ -74,77 +45,8 @@ server { } } -## BACKEND ## -server { - listen 80; - - root /app/backend/web; - index index.php index.html; - - server_name backend.yii2-starter-kit.localhost; - - charset utf-8; - - client_max_body_size 16m; - - # There is a VirtualBox bug related to sendfile that can lead to - # corrupted files, if not turned-off on Vagrant based setup - # sendfile off; - - location / { - try_files $uri $uri/ /index.php?$args; - } - - # location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ { - # access_log off; - # expires max; - # } - - location ~ \.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_pass php-fpm; - fastcgi_index index.php; - include fastcgi_params; - } - -} - -## STORAGE ## -server { - listen 80; - server_name storage.yii2-starter-kit.localhost; - - root /app/storage/web; - index index.html; - # expires max; - - # There is a VirtualBox bug related to sendfile that can lead to - # corrupted files, if not turned-off - # sendfile off; - - location / { - try_files $uri $uri/ /index.php?$args; - } - - location ~ \.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_pass php-fpm; - fastcgi_index index.php; - include fastcgi_params; - } -} ## PHP-FPM Servers ## upstream php-fpm { server app:9000; } - -## MISC ## -### WWW Redirect ### -server { - listen 80; - server_name www.yii2-starter-kit.localhost; - return 301 http://yii2-starter-kit.localhost$request_uri; -}