i have problem nginx configuration. wanna have laravel app in subdirectory, domain.com/alfa. @ domain.com app. , laravel routes gives 404 on nginx subdirectory. find error?
my paths:
- /var/www/ <-- it's domain.com
- /var/www/alfa_path <-- it's domain.com/alfa
it's nginx configuration:
server { listen 80; server_name domain.com; root /var/www; index index.php index.html index.htm; location / { } location /alfa { root /var/www/alfa_path/public; index index.php index.html index.htm; try_files $uri $uri/ /alfa_path/public/index.php?$query_string; } location ~ .php$ { try_files $uri =404; fastcgi_pass unix:/var/run/www.sock; fastcgi_index index.php; fastcgi_param script_filename $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } location /phpmyadmin { root /usr/share/; index index.php index.html index.htm; location ~ ^/phpmyadmin/(.+\.php)$ { try_files $uri =404; root /usr/share/; fastcgi_pass unix:/var/run/www.sock; fastcgi_index index.php; fastcgi_param script_filename $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; } location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { root /usr/share/; } } location /phpmyadmin { rewrite ^/* /phpmyadmin last; } }
Comments
Post a Comment