VPS侦探论坛

标题: 请问军哥,如何更改虚拟主机端口号啊? [打印本页]

作者: koy1619    时间: 2012-8-15 16:07
标题: 请问军哥,如何更改虚拟主机端口号啊?
求助军哥,我创建了一个虚拟主机访问地址为http://172.16.0.35默认端口为80,我把默认端口更改为86之后访问http://172.16.0.35:86直接  403 Forbidden

iptables加进86端口了!

请问军哥,如何更改虚拟主机端口号啊?
  1. log_format
  2. 172.16.0.35  '$remote_addr - $remote_user [$time_local] $request '
  3.              '$status $body_bytes_sent $http_referer '
  4.              '$http_user_agent $http_x_forwarded_for';
  5. server
  6.         {
  7.                 listen       86;
  8.                 server_name 172.16.0.35;
  9.                 index index.html index.htm index.php default.html default.htm default.php;
  10.                 root  /home/wwwroot/koy;

  11.                 include wordpress.conf;
  12.                 location ~ .*\.(php|php5)?$
  13.                         {
  14.                                 try_files $uri =404;
  15.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  16.                                 fastcgi_index index.php;
  17.                                 include fcgi.conf;
  18.                         }

  19.                 location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  20.                         {
  21.                                 expires      30d;
  22.                         }

  23.                 location ~ .*\.(js|css)?$
  24.                         {
  25.                                 expires      12h;
  26.                         }

  27.                 access_log  /home/wwwlogs/
  28. 172.16.0.35 .log
  29. 172.16.0.35 ;
  30.         }
复制代码

[ 本帖最后由 koy1619 于 2012-8-15 16:09 编辑 ]
作者: licess    时间: 2012-8-15 16:38
403 Forbidden 肯定是目录下面没index文件




欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) Powered by Discuz! X3.4