Quantcast
Channel: WampServer - WampServer English
Viewing all articles
Browse latest Browse all 3177

Access to virtual host from internet (no replies)

$
0
0
Hi!

My config is:
Win7 x64 (SP1)
WampServer Version 3.1.7 64bit
Apache 2.4.37
PHP 7.12.14
MySQL 5.7.24
WampServer icon is green (and start/stop/restart services works fine)

I want to create access to virtual host from internet.

What I've done:
1. Create rules for ports 80 and 443 forwarding on my router. It works.
2. Create Windows Firewall inbound rule for ports 80 and 443. It works too.
3. Change Require local to Require all granted in httpd-vhosts.conf in localhost section, Restart All Services and get access to localhost from internet. All it works.
4. Create Virtual Host with name WampShared via Add a Virtual Host from Tools menu.
5. In WampShared virtual host directory I create index.php file with simple echo command. It works on [wampshared] address.
6. Change Require local to Require all granted in httpd-vhosts.conf in WampShared section and change back Require all granted to Require local in localhost section. Restart All Services.

Now I see "Forbidden You don't have permission to access / on this server" message.

7. Disable Antivirus, just in case. Nothing changed.

My httpd-vhosts.conf is:
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>


#
<VirtualHost *:80>
ServerName WampShared
DocumentRoot "e:/wamp_shared"
<Directory "e:/wamp_shared/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>


Lines in C:\Windows\System32\drivers\etc\hosts:
127.0.0.1 localhost
::1 localhost

127.0.0.1 WampShared
::1 WampShared

What could be wrong? Why localhost works, but WampShared don't?

Thanks.

Viewing all articles
Browse latest Browse all 3177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>