我试图通过Internet访问我的WAMP Web服务器(3.1.4),即使经历了有关堆栈交换主题的每个已回答问题,我仍收到权限错误。
WAMP设置为“在线”,并且为绿色。我可以在主机上访问服务器,并且可以正常浏览每个网页。我什至可以使用域名来浏览和浏览网站,这不是问题。
我的防火墙在侦听端口上打开了入站连接,并且我的路由器也为该端口启用了端口转发。
我已授予httpd-vhosts.conf中的所有权限:
# Virtual Hosts
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
#
<VirtualHost *:80>
ServerName example
DocumentRoot "c:/wamp64/www/example"
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteCond $1 ^(index\.php)?$ [OR]
RewriteCond $1 \.(gif|jpg|png|ico|css|js)$ [NC,OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ - [S=1]
RewriteRule . /index.php [L]
</IfModule>
# END wordpress
<Directory "c:/wamp64/www/example/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
我已授予httpd.conf中的所有权限:
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +FollowSymLinks +Multiviews
AllowOverride all
# onlineoffline tag - don't remove
Require all granted
</Directory>
我已授予phpmyadmin.conf中的所有权限:
Alias /phpmyadmin "c:/wamp64/apps/phpmyadmin4.8.3/"
<Directory "c:/wamp64/apps/phpmyadmin4.8.3/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride all
<ifDefine APACHE24>
Require all granted
</ifDefine>
<ifDefine !APACHE24>
Order Deny,Allow
Allow from all
Allow from ::1
</ifDefine>
# To import big file you can increase values
php_admin_value upload_max_filesize 128M
php_admin_value post_max_size 128M
php_admin_value max_execution_time 360
php_admin_value max_input_time 360
</Directory>
我已授予主机文件中的所有权限:
127.0.0.1 localhost
::1 localhost
127.0.0.1 example.com
::1 example.com
编辑
我忘记在httpd.conf中显示其他设置:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
答案 0 :(得分:0)
原来,该域名不是重定向到我的主机,而是重定向到我购买该域名的站点的DNS。我设置的权限还不错,所以这是我不熟悉的替代解决方案。