0
在nginx的befor我們改變的/ etc/nginx的/網站可用/默認在nginx的1.13.3如何配置default.conf爲laravel 5.x的
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/laravel/public;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name <Your Domain name/Public IP Address>;
location/{
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$query_string;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
但nginx的1.13.3我們如何才能放置這個變化?
你在尋找default.conf嗎?如果是這樣,你可以在/etc/nginx/conf.d或/ etc/nginx/sites-available中找到它。它取決於哪個包含在/etc/nginx/nginx.conf文件中。 – Madeny