VPS侦探论坛

 找回密码
 注册
查看: 6808|回复: 1

[Apache] 请问军哥,如何更改虚拟主机端口号啊?

[复制链接]
发表于 2012-8-15 16:07:09 | 显示全部楼层 |阅读模式

求助军哥,我创建了一个虚拟主机访问地址为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 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-8-15 16:38:01 | 显示全部楼层


403 Forbidden 肯定是目录下面没index文件
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-17 02:52 , Processed in 0.026030 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表