php - Nginx multiple projects in one domain blank page laravel -
this config here nginx have domain named tstdmn , 2 laravel projects first tstdmn.com project , second florist project want deploy florist project tstdmn.com/florist , set return blank page @ tstdmn.com/florist what's issue here?! , know problem nginx configuration because switch florist project main project , works, not laravel configurations
root /var/www/html/tstdmn.com/public; # add index.php list if using php index index.html index.php index.htm index.nginx-debian.html; server_name tstdmn.com www.tstdmn.com; location / { # first attempt serve request file, # directory, fall displaying 404. try_files $uri $uri/ /index.php?$query_string; } location ^~ /florist { alias /var/www/html/florist/florist_backend/public; try_files $uri $uri/ @laravel1; location ~ \.php { fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; fastcgi_split_path_info ^(.+\.php)(.*)$; include /etc/nginx/fastcgi_params; } } location @laravel1 { rewrite /florist/(.*)$ /florist/index.php?/$1 last; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.1-fpm.sock; }
and routes of project show's blank /register
i solved someone's solution @ laracasts: using subdomain instead of routing
server { listen 80; listen [::]:80; root /var/www/html/florist/florist_backend/public; # add index.php list if using php index index.html index.php index.htm index.nginx-debian.html; server_name florist.tstdmn.com; location / { # first attempt serve request file, # directory, fall displaying 404. try_files $uri $uri/ /index.php?$query_string; }
..... , code not related
address of question in laracast https://laracasts.com/discuss/channels/servers/nginx-multiple-projects-in-one-domain-errors
Comments
Post a Comment