php 配置域名与端口号,lnmp 配置不同端口号的域名
1、首先用putty進去如192.168.18.67
2、 ps -ef | grep nginx 查看nginx位置和config位置
3、cd /usr/local/nginx/conf/ 進去 打開config 如vi nginx.conf
4、殺死之前的進程killall -9 /usr/local/nginx/sbin/nginx
5、/usr/local/nginx/sbin/nginx重新啟動nginx
ngnix格式
server
{
listen 80;
server_name 192.168.2.67;
index index.html index.htm index.php;
root /home/wwwroot;
location ~ .*\.(php|php5)?$
{
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location /status {
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /home/wwwlogs/access.log access;
}
總結
以上是生活随笔為你收集整理的php 配置域名与端口号,lnmp 配置不同端口号的域名的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: matlab考试湖北理工学院,电子信息工
- 下一篇: php+yii手册下载,yii中文手册-