S
S
stavanger2016-01-21 17:58:27
Nginx
stavanger, 2016-01-21 17:58:27

How to setup nginx.config for laravel 5.1 under isp manager?

Hello, please help me to cope with the config, I have already found everything, I don’t understand what is the reason in this situation.
I use isp manager 5 through it I configure the nginx config, I see the input file in public, but as soon as I go to another page I
immediately see 404 Not Found. I can reconfigure the config to work according to the documentation, but then there are problems with logging into mysql on the server and redirecting from http to https, since this config is configured for isp manager and it is not recommended to change it, it has its own nuances.
The main problem is that we can’t navigate through the pages of the site, we won’t get 404 Not Found.
Many thanks to everyone who will not pass by.
Here is my config.
#user 'admin' virtual host 'example.ru' configuration file
server {
server_name example.ru www.example.ru;
charset UTF-8;
disable_symlinks if_not_owner from=$root_path;
index index.html index.php;
root $root_path;
set $root_path /var/www/admin/data/www/example.ru/public;
access_log /var/www/httpd-logs/example.ru.access.log ;
error_log /var/www/httpd-logs/example.ru.error.log notice;
include /etc/nginx/vhosts-includes/*.conf;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}
}
location @php {
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f [email protected]";
fastcgi_pass unix:/var/www/php-fpm/admin.sock;
fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
try_files $uri =404;
include fastcgi_params;
}
ssi on;
listen 83.166.240.149:80;
return 301 https://$host$request_uri;
}
server {
server_name example.ru www.example.ru;
charset UTF-8;
disable_symlinks if_not_owner from=$root_path;
index index.html index.php;
root $root_path;
set $root_path /var/www/admin/data/www/example.ru/public;
access_log /var/www/httpd-logs/example.su.access.log ;
error_log /var/www/httpd-logs/example.ru.error.log notice;
include /etc/nginx/vhosts-includes/*.conf;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @php;
}
}
location @php {
fastcgi_index index.php;
fastcgi_param PHP_ADMIN_VALUE "sendmail_path = /usr/sbin/sendmail -t -i -f [email protected]";
fastcgi_pass unix:/var/www/php-fpm/admin.sock;
fastcgi_split_path_info ^((?U).+\.ph(?:p\d*|tml))(/?.+)$;
try_files $uri =404;
include fastcgi_params;
}
ssi on;
add_header Strict-Transport-Security "max-age=31536000;";
listen 12.123.123.123:443;
ssl on;
ssl_certificate "/var/www/httpd-cert/admin/example.ru.crtca";
ssl_certificate_key "/var/www/httpd-cert/admin/example.ru.key";
ssl_ciphers HIGH:!RC4:!aNULL:!eNULL:!MD5:!EXPORT:!EXP:!LOW:!SEED:!CAMELLIA:!IDEA:!PSK:!SRP:!SSLv2;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question