Accessing Wamp 3.1.0 from other devices - apache

I have Wamp Server 3.1.0 installed on my Windows computer.
I am trying to access my sites from other devices, connected are connected on the same network.
I have searched online. And I have followed tutorials, but nothing matches what I need. The closest I got was: How to enable local network users to access my WAMP sites?
My httpd-vhosts.conf looks like this:
# 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 granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName laravel.dev
DocumentRoot "c:/wamp/projects/forum/public"
<Directory "c:/wamp/projects/forum/public/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName test.dev
DocumentRoot "c:/wamp/projects/test/public"
<Directory "c:/wamp/projects/test/public/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local granted
</Directory>
</VirtualHost>
My expectation at this point is I can go onto another device and access my Wamp Server 3.1.0 and my individual projects.
Unfortunately I'm hit with an Error 500 saying:
Forbiddon
You do not have permission to access / on this server.
_______________________________________________________________
Apache/2.4.27 (Win64) PHP/7.1.9 Server at 192.168.1.21 Port 80
I have double checked my ipconfig and IPv4 Address matches the IP in the Error 500 code: 192.168.1.21
I did notice that the Apache version and PHP version match the versions I am using. So I know I'm accessing the server. Just not sure of the Error 500 code.
I have tried accessing my projects from these URLs:
http://192.168.1.21
http://192.168.1.21:80
http://laravel.dev/
http://test.dev/
http://localhost/
And none of them work.
Thanks in advance.

Change Require local granted to Require all granted, if not solved, Try to edit httpd-vhosts.conf file like this:
# 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
Require ip 192.168.1
</Directory>
</VirtualHost>
try access your ip computer from other device, for example your computer ip is 192.168.1.4, if you can access this ip, then create your virtual host.
if you can not access that ip, try fixing it so ip can be accessed. then create a virtual hosts.

Related

WAMP server not able to be viewed on LAN

I've tried changing things in the vhost config and the httpd config but it never is able to be viewed on the same wifi network.
In vhosts I changed it to
# Virtual Hosts
#
<VirtualHost *:80>
ServerName Test
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www/ConklinServer"
<Directory "${INSTALL_DIR}/www/ConklinServer">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
But it doesnt work, i also changed the listen ip in httpd config and that doesnt work either. Help!

I can't access my WAMP 3.2.3 project from other devices

I have developed a website with a complete different virtual host in WAMP v 3.2.3 it's running well on my local machine(localhost) but the problem lies with it's access over the LAN.I have changed its apache httpd-vhosts.conf file from
# 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> //My required Virtual Host
ServerName test
DocumentRoot "c:/wamp64/www/project1/test/sites/">"
<Directory "c:/wamp64/www/project1/test/sites/">">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require Local
</Directory>
</VirtualHost>
to:
# 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> //My required Virtual Host
ServerName test
DocumentRoot "c:/wamp64/www/project1/test/sites/">
<Directory "c:/wamp64/www/project1/test/sites/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted // <--change(Local to all granted)
</Directory>
</VirtualHost>
and allowed incoming inbound connection from port 80
Still the problem persists and I cannot access my project from any other device.
It shows:
Forbidden
You don't have permission to access this resource
Apache/2.4.46 (Win64)PHP/7.3.21 Server at 192.168.43.*
Where'the problem?
Please help.
you don't need to hide your local IPv4 address 192.168.43.*, there are millions of devices around the world with same IPv4 address as you, people outside of your local network can not communicate with your local IP address just by knowing your IPv4 address, it is not possible.
You appear to have multiple virtual hosts set up for port 80. You only need one for local hosting.
Make sure that the firewall on your server computer is configured to let apache through.
Put whatever files you want to server inside the 'www' folder on your server computer.
Use the below config settings and restart apache so that the new config is loaded.
Open a web browser on any device that is connected to the same local network as your server computer i.e. mobile phone connected by wifi to the same router as your server computer.
Type in the server computer IPv4 address into the browser of your mobile phone, done...
<VirtualHost *:80>
DocumentRoot ${INSTALL_DIR}/www
<Directory ${INSTALL_DIR}/www>
Require all granted
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
</Directory>
</VirtualHost>
# 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>
To
# 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
Require all granted
</Directory>
</VirtualHost>
Next step: Open wamp file see this image
find this section to changes see this image
Require all denied
To
Require all granted
Save and close. Restart all service your wampserver
then paste your ipaddress in browser url see the result

The requested URL / was not found on this server. in Wamp 3.1.0

I know there are similar questions about this but non of them resolve my problem.
I already used virtual host and it was running before until this morning this error occurred when I tried to access this link http://www.notification.test/
I have this kind of error.
Not Found
The requested URL / was not found on this server.
Apache/2.4.27 (Win64) Server at www.notification.test Port 80
I have this in my hosts 127.0.0.1 www.notification.test
and this is my setup in C:\wamp64\bin\apache\apache2.4.27\conf\extra
<VirtualHost *:80>
DocumentRoot C:/wamp64/www/notification/public
ServerName www.notification.test
<Directory C:/wamp64/www/notification/public>
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I just add the directory as what suggested from another post but didn't work.
My Wamp version is 3.1.0 running in 64 bit windows7 OS and the Apache is 2.4.47.
Need some help guys and thank you.
Basically its just a missing / see the <Directory..... parameter.
<VirtualHost *:80>
ServerName notification.test
ServerAlias www.notification.test
DocumentRoot "C:/wamp64/www/notification/public"
<Directory "C:/wamp64/www/notification/public/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Also you HOSTS file should look like this
127.0.0.1 localhost
127.0.0.1 notification.test
::1 localhost
::1 notification.test
Note:
Require all granted is a bit unnecessary if you are just using other PC's in your own network. Instead use Require ip 192.168.0 for example, to allow any ip in your local network access but nothing outside your own network.

External access web page with VirtualHosts and Wampserver

I am a newbie in wampserver.
I installed it and I can acesss web pages with localhost port 8000 without problems. Yes, I changed default port to 8000 and all works well with localhost.
Now, I created a simple project web page and I need external access. Here is my settings:
But I get the next error when I try to acesss remotely:
Forbidden
You don't have permission to access / on this server.
Apache/2.4.23 (Win64) PHP/5.6.25 Server at agenda.myvnc.com Port 8000
//agenda.myvnc.com is my elastic IP host server
My sample project:
Folders:
c:\wamp64\www
...........cloudappoint.myvnc.com(subfolder in www)
File in cloudappoint.myvnc.com folder: index.php
NOIP DNS:
- Host:cloudappoint.myvnc.com
- Target IP:XXX.XXX.XXX:8000(My host is located at amazon ec2 with elastic ip- XXXX.XXX.XXX)
- type:URL
WampServer VirtualHosts:
<VirtualHost *:8000>
ServerName cloudappoint.myvnc.com
DocumentRoot c:/wamp64/www/cloudappoint.myvnc.com
ErrorLog "logs/agenda-error.log"
CustomLog "logs/agenda-access.log" common
<Directory "c:/wamp64/www/cloudappoint.myvnc.com">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
EDITED: Here is my complete Virtual hosts file:
<VirtualHost *:8000>
ServerName localhost
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:8000>
ServerName cloudappoint
ServerAlias cloudappoint.myvnc.com
DocumentRoot c:/wamp64/www/webagenda
ErrorLog "logs/agenda-error.log"
CustomLog "logs/agenda-access.log" common
<Directory "c:/wamp64/www/webagenda/">
Options +Indexes +FollowSymLinks +MultiViews
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I am unable to acesss remotely cloudappoint.myvnc.com, but if I move
<Directory "c:/wamp64/www/webagenda/">
Options +Indexes +FollowSymLinks +MultiViews
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
out from VirtualHost, all works well. Then, I guess 3.06 has broken Directory into Virtual Hosts.

Wamp is Green and Online but still 403 error

C:\wamp\bin\apache\apache2.4.9:
<VirtualHost *:80>
DocumentRoot C:\wamp\wwww\sk\public
ServerName sk.localhost
SetEnv APPLICATION_ENV "development"
<Directory "C:\wamp\wwww\sk\public">
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
Require local
Allow from localhost ::1 127.0.0.1
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:\wamp\wwww\sk\public
ServerName sk.localhost
SetEnv APPLICATION_ENV "development"
<Directory "C:\wamp\wwww\sk\public">
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
Require local
Allow from localhost ::1 127.0.0.1
</Directory>
</VirtualHost>
Hosts file:
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost
127.0.0.1 sk.localhost
When I try to access localhost or sk.localhost it gives me 403 error (Wamp is green and Online. Anyone can help please? I don`t know what am I doing wrong here. I tried several methods from Internet but with no luck. Any help would be much appreciated. Best regards, Bogdan.
PHPMyadmin is working.
This is probably because you are using 2 different versions of the access security syntax and Apache is getting confused.
Change your Virtual Host definitions as below to use just the Apache 2.4 syntax and not the Apache 2.2 ones.
Also you should create a VH for localhost as well, as when you implement Virtual Hosts, Apache ignores the definition of localhost in the httpd.conf file.
# Should be the first VHOST definition so that it is the default virtual host
# Also access rights should remain restricted to the local PC
# So that any random ip address attack will recieve an error code and not gain access
<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:\wamp\wwww\sk\public
ServerName sk.localhost
SetEnv APPLICATION_ENV "development"
<Directory "C:\wamp\wwww\sk\public">
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:\wamp\wwww\sk\public
ServerName sk.localhost
SetEnv APPLICATION_ENV "development"
<Directory "C:\wamp\wwww\sk\public">
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php
AllowOverride All
Require local
</Directory>
</VirtualHost>
The Require local tells Apache to only allow access to a VH domain if the client is on the PC running WampServer(Apache).
If you actually want to allow access from say another PC on your local network, you can add a line like this to the domain you want to access
Require local
Require ip 192.168.1
Or if you want to allow access from anwhere replace those lines with
Require all granted
WARNING Dont allow access to the universe unless you really know what you are doing.
PS The WAMPserver Online/Offline feature only controls access and does not mean APache is running or not. Also once you implement Virtual Hosts it no longer has any relevance and shoudl be set OFFLINE as access control is now held in each individual Virtual Host.