我在laravel開發了一個網站,我想將它安裝在運行nginx的本地機器上作爲Web服務器。下面是我的配置文件laravel的NGNIX服務器設置5.2
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root html;
index index.html index.php;
# Make site accessible from http://localhost/
server_name localhost;
location/{
root html;
index index.php;
}
location ~ .php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME C:/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}
}
當我瀏覽http://localhost/mysite/運行C:/nginx/html/mysite/index.php
我要執行C:/ nginx的/ HTML/mysite的/公改爲/index.php文件。我該怎麼做?
創建一個新的正則表達式位置塊,指向'mysite'並使用其中的'root'指令設置新的根目錄。 –
如何我可以做到這一點,如果我想執行此文件第一C:/nginx/html/mysite/public/index.php – DOE