亚洲免费在线视频-亚洲啊v-久久免费精品视频-国产精品va-看片地址-成人在线视频网

您的位置:首頁技術文章
文章詳情頁

web - nginx怎么綁定域名?

瀏覽:93日期:2023-08-17 09:32:44

問題描述

rt,網上一搜都是多域名的做法,然而本著試一試的想法做了之后發現沒用。。。特來詢問一下怎么寫配置文件才可以。。

問題解答

回答1:

web - nginx怎么綁定域名?

它的配置文件很明確。你照著改就行了server_name 那里把localhost改成自己的域名就行了。

回答2:

主配置文件

user huangyanxiong;worker_processes 1;error_log /var/log/nginx/error.log warn;pid/var/run/nginx.pid;events { worker_connections 1024;}http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main ’$remote_addr - $remote_user [$time_local] '$request' ’ ’$status $body_bytes_sent '$http_referer' ’ ’'$http_user_agent' '$http_x_forwarded_for'’; access_log /var/log/nginx/access.log main; sendfileon; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf;}

包含的虛擬主機配置文件

log_format compression ’$remote_addr - $remote_user [$time_local] ’ ’'$request' $status $bytes_sent ’ ’'$http_referer' '$http_user_agent' '$gzip_ratio'’;#access_log /var/log/nginx/log/studyphome.access.log compression buffer=32k;server { listen 80; server_name www.mylaravel.com charset utf-8; #log_format compression ’$remote_addr - $remote_user [$time_local] ’ # ’'$request' $status $bytes_sent ’ # ’'$http_referer' '$http_user_agent' '$gzip_ratio'’; access_log /var/log/nginx/log/www.mylaravel.access.log compression buffer=32k; error_log /var/log/nginx/log/www.mylaravel.error.log; root/home/huangyanxiong/www/laravel/public; location / {#root /var/www/html;try_files $uri $uri/ /index.php?$query_string;index index.html index.htm index.php; } 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 /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ .php$ { # proxy_pass http://127.0.0.1:8080; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ .php$ {#root html;fastcgi_pass 127.0.0.1:9090;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;includefastcgi_params; } location ~ ^/(images|javascript|js|css|flash|media|static)/ { #過期30天,靜態文件不怎么更新,過期可以設大一點, #如果頻繁更新,則可以設置得小一點。 expires 30d; } # deny access to .htaccess files, if Apache’s document root # concurs with nginx’s one # location ~ /.ht {deny all; }}回答3:

我怎么覺得是你的域名解析沒有添加記錄對應的記錄呢

標簽: web
相關文章:
主站蜘蛛池模板: 国产精品欧美亚洲韩国日本 | 成年人免费观看视频网站 | 2017天天爽夜夜爽精品视频 | 国产美女视频网站 | 国产视频a| 在线观看视频亚洲 | 欧美三级美国一级 | 欧美久久一区二区 | 免费日本在线视频 | 8000av在线| 成人99国产精品 | 日本一线一区二区三区免费视频 | 久章草在线观看 | 精品色视频 | 免费永久在线观看黄网 | 一本久久道久久爱 | 97国产免费全部免费观看 | 国产三级视频网站 | 在线免费观看日本视频 | 草草影院ccyy国产日本欧美 | 欧美一级视频免费观看 | 丝袜黄色片 | 黄色三级理论片 | 日韩国产成人精品视频人 | 亚洲欧美精品成人久久91 | 国产不卡一区二区三区免费视 | 精品欧美日韩一区二区 | 久久久精品免费热线观看 | 分享一个无毒不卡免费国产 | 亚洲视频日韩 | 国产黄色小视频在线观看 | 香蕉久久国产 | 九九九精品视频 | 日美三级| 亚洲精品高清国产麻豆专区 | 久久视频精品线视频在线网站 | 久久免费观看国产精品 | 欧美成人在线影院 | 欧美一区在线观看视频 | 精品在线一区二区 | 午夜欧美精品久久久久久久久 |