第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Mac上的Nginx虛擬塊指向localhost的index.php

Mac上的Nginx虛擬塊指向localhost的index.php

PHP
繁星點點滴滴 2022-10-14 16:07:46
我正在配置虛擬主機以在我的 mac 上為 .localhost 域提供服務(wù)。但是當我在瀏覽器中打開“project.localhost”時,它顯示的頁面與瀏覽 localhost 的索引相同。(ps:我還配置了 dnsmasq 和 /etc/hosts)。(試圖提供 index.php)這是我的 nginx.conf:worker_processes  1;events {    worker_connections  1024; }http {    include       mime.types;    default_type  application/octet-stream;    server_names_hash_bucket_size 64;    client_max_body_size 50M;    sendfile        on;    keepalive_timeout  65;    server {        listen       80;        server_name  localhost;        root   html;        location / {            # root   html;            index index.php index.html index.htm;        }        #error_page  404              /404.html;        # redirect server error pages to the static page /50x.html        #        error_page   500 502 503 504  /50x.html;        location = /50x.html {            # root   html;        }        location ~ \.php$ {            # root           html;            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;            fastcgi_param  SCRIPT_FILENAME $request_filename;            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;            include        fastcgi_params;        }    }    include servers/*; }這是可用的站點:    server {        listen 80;        listen project.localhost:80;        server_name project.localhost;        location / {            root html/project.localhost/public_html;            index index.php index.html index.htm;            try_files $uri $uri/ =404;        }}但是當我在瀏覽器中瀏覽 project.localhost 時,它會顯示與 localhost/index.php 相同的頁面。我究竟做錯了什么?
查看完整描述

1 回答

?
楊__羊羊

TA貢獻1943條經(jīng)驗 獲得超7個贊

正如@Richard 在評論部分中提到的那樣,我能夠通過在 我的 nginx.conf 中包含sites-available/*.conf:來解決這個問題。謝謝@理查德include /usr/local/etc/nginx/sites-available/*.confinclude server/*



查看完整回答
反對 回復(fù) 2022-10-14
  • 1 回答
  • 0 關(guān)注
  • 108 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號