`Я установил laravel на centos 7. Домашняя страница Laravel работает нормально, но когда я пытаюсь подключить myipaddres / phpmyadmin, я получаю ошибку 404 not found. Я не знаю, какое сообщение об ошибке я должен показать вам, чтобы помочь мне. используя nginx.
Конфигурация nginx:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name myipaddress;
root /usr/share/nginx/html;
.
include /etc/nginx/default.d/*.conf;
location / {
root /var/www//public_html;
index index.html index.htm;
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
This is laravel.conf
server {
listen 80;
listen [::]:80 ipv6only=on;
# Log files for Debugging
access_log /var/log/nginx/laravel-access.log;
error_log /var/log/nginx/laravel-error.log;
# Webroot Directory for Laravel project
root /var/www/laravel/public;
index index.php index.html index.htm;
# Your Domain Name
server_name myipaddress;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# PHP-FPM Configuration Nginx
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
This is phpmyadmin.conf
server {
listen 80;
server_name myipaddress;
root /usr/share/nginx/html;
# note that these lines are originally from the "location /" block
location / {
index index.php index.html index.htm;
}
# location / {
# try_files $uri $uri/ =404;
# }
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}