Apache 设置WAMP服务器-获取403
我想把我的网站放到网上。我正在使用WAMPServer2.2。现在,我已经设置了wamp,如下所示:Apache 设置WAMP服务器-获取403,apache,wamp,apache-config,Apache,Wamp,Apache Config,我想把我的网站放到网上。我正在使用WAMPServer2.2。现在,我已经设置了wamp,如下所示: <Directory /> AllowOverride All Options All Require all granted Order allow,deny </Directory> Listen 81 <VirtualHost *:81> ServerName rti.etf.rs DocumentRoot "C:/wamp/w
<Directory />
AllowOverride All
Options All
Require all granted
Order allow,deny
</Directory>
Listen 81
<VirtualHost *:81>
ServerName rti.etf.rs
DocumentRoot "C:/wamp/www"
DirectoryIndex index.php
</VirtualHost>
允许超越所有
选项全部
要求所有授权
命令允许,拒绝
听81
ServerName rti.etf.rs
DocumentRoot“C:/wamp/www”
DirectoryIndex.php
我已在Windows防火墙中打开端口81。现在,当我尝试打开localhost:81时,我的网页打开得很好。然而,当我尝试用我的外部IP地址176.xxx.xxx.xxx:81访问它时,我得到一个403禁止的错误。我在Apache访问日志中看到了这些请求,所以我想这部分设置得很好,但我肯定缺少Apache配置中的某些内容
编辑:启用联机选项
有什么有用的想法吗?好的,试试这个,你没有指定你使用的是哪个版本的Apache,而且你似乎把Apache 2.2语法和Apache 2.4语法混在了一起,所以我给出了这两个版本 将此部分改回原来的状态,这样可以控制对
C:\
的访问,而您只允许完全访问它,这并不好
从
允许超越所有
选项全部
要求所有授权
命令允许,拒绝
到
Apache2.2.x语法
<Directory />
Options FollowSymLinks
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
选项如下符号链接
不允许超限
命令拒绝,允许
全盘否定
Apache2.4.x语法
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
选项如下符号链接
不允许超限
要求全部拒绝
现在转到虚拟主机。这还需要在块内指定它自己的安全性
Listen 81
<VirtualHost *:81>
ServerName rti.etf.rs
DocumentRoot "C:/wamp/www"
DirectoryIndex index.php
#### Apache 2.2 syntax
<Directory "C:/wamp/www/">
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
#### Apache 2.4 syntax
<Directory "C:/wamp/www/">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
听81
ServerName rti.etf.rs
DocumentRoot“C:/wamp/www”
DirectoryIndex.php
####Apache2.2语法
允许超越所有
命令允许,拒绝
通融
####Apache2.4语法
允许超越所有
要求所有授权
附言。
我看不出使用端口81有什么好处,它只会让外部用户的生活更加复杂。好吧,试试看,您没有指定使用的是哪个版本的Apache,而且您似乎将Apache 2.2语法与Apache 2.4语法混在一起,所以我给出了这两个版本 将此部分改回原来的状态,这样可以控制对
C:\
的访问,而您只允许完全访问它,这并不好
从
允许超越所有
选项全部
要求所有授权
命令允许,拒绝
到
Apache2.2.x语法
<Directory />
Options FollowSymLinks
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
选项如下符号链接
不允许超限
命令拒绝,允许
全盘否定
Apache2.4.x语法
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
选项如下符号链接
不允许超限
要求全部拒绝
现在转到虚拟主机。这还需要在块内指定它自己的安全性
Listen 81
<VirtualHost *:81>
ServerName rti.etf.rs
DocumentRoot "C:/wamp/www"
DirectoryIndex index.php
#### Apache 2.2 syntax
<Directory "C:/wamp/www/">
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
#### Apache 2.4 syntax
<Directory "C:/wamp/www/">
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
听81
ServerName rti.etf.rs
DocumentRoot“C:/wamp/www”
DirectoryIndex.php
####Apache2.2语法
允许超越所有
命令允许,拒绝
通融
####Apache2.4语法
允许超越所有
要求所有授权
附言。
我看不出使用端口81有什么好处,它只会让外部用户的生活变得更加复杂。联机菜单选项?或者你有没有看到这个问题:哦,我忘了写我也把我的服务器上网了。上网菜单选项?或者你看到这个问题了吗:哦,我忘了写我也把我的服务器放到网上了。