Created
June 8, 2021 23:57
-
-
Save vivekpatil94/1798111756028685f3126140abef0b21 to your computer and use it in GitHub Desktop.
Laravel in subdirectory Nginx Config
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; | |
listen [::]:80; | |
root /var/www/; | |
index index.php index.html index.htm index.nginx-debian.html; | |
server_name 0.0.0.0; //Ip Address of Machine | |
location / { | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
location ~ \.php$ { | |
include snippets/fastcgi-php.conf; | |
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; | |
} | |
# MULTI-LINK FOLDER START | |
location /multi-link { | |
alias /var/www/multi-link/public; | |
try_files $uri $uri/ @multi-link; | |
location ~ \.php$ { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; | |
} | |
} | |
location @multi-link { | |
rewrite /multi-link/(.*)$ /multi-link/index.php?/$1; | |
} | |
# MULTI-LINK FOLDER END | |
# ACCORN DASHBORD FOLDER START | |
location /acorn-dashboard { | |
alias /var/www/acorn-laravel-classic-dashboard/public; | |
try_files $uri $uri/ @acorn-dashboard; | |
location ~ \.php$ { | |
include fastcgi_params; | |
include snippets/fastcgi-php.conf; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; | |
} | |
} | |
location @acorn-dashboard { | |
rewrite /acorn-dashboard/(.*)$ /acorn-dashboard/index.php?/$1 last; | |
} | |
# ACCORN DASHBORD FOLDER END | |
# ACCORN ECOMMERCE FOLDER START | |
location ^~ /acorn-platform { | |
alias /var/www/acorn-laravel-ecommerce-platform/public; | |
try_files $uri $uri/ @acorn-platform; | |
location ~ \.php$ { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; | |
} | |
} | |
location @acorn-platform { | |
rewrite /acorn-platform/(.*)$ /acorn-platform/index.php?/$1 last; | |
} | |
# ACCORN ECOMMERCE FOLDER END | |
# ACCORN STARTER FOLDER START | |
location /acorn-project { | |
alias /var/www/acorn-laravel-starter-project/public; | |
autoindex off; | |
try_files $uri $uri/ @acorn-project; | |
location ~ \.php { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; | |
} | |
} | |
location @acorn-project { | |
rewrite /acorn-project/(.*)$ /acorn-project/index.php?/$1 last; | |
} | |
# ACCORN STARTER FOLDER END | |
# ACCORN PROVIDER FOLDER START | |
location /acorn-provider { | |
alias /var/www/acorn-laravel-service-provider/public; | |
autoindex off; | |
try_files $uri $uri/ @acorn-provider; | |
location ~ \.php { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; | |
} | |
} | |
location @acorn-provider { | |
rewrite /acorn-provider/(.*)$ /acorn-provider/index.php?/$1 last; | |
} | |
# ACCORN PROVIDER FOLDER END | |
# NonProfit-CommunityFiles FOLDER START | |
location /nonprofit_communityfiles { | |
alias /var/www/NonProfit-CommunityFiles; | |
try_files $uri $uri/ @nonprofit_communityfiles; | |
location ~ \.php$ { | |
include fastcgi_params; | |
include snippets/fastcgi-php.conf; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; | |
} | |
} | |
location @nonprofit_communityfiles { | |
rewrite /nonprofit_communityfiles/(.*)$ /nonprofit_communityfiles/index.php?/$1 last; | |
} | |
# END OF THE NonProfit-CommunityFiles | |
# NonProfit-Community-Store FOLDER START | |
location /nonprofit_communitystore { | |
alias /var/www/NonProfit-Community-Store/public; | |
try_files $uri $uri/ @nonprofit_communitystore; | |
location ~ \.php$ { | |
include fastcgi_params; | |
include snippets/fastcgi-php.conf; | |
fastcgi_param SCRIPT_FILENAME $request_filename; | |
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; | |
} | |
} | |
location @nonprofit_communitystore { | |
rewrite /nonprofit_communitystore/(.*)$ /nonprofit_communitystore/index.php?/$1 last; | |
} | |
# END OF THE NonProfit-Community-Store | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment