when attempting to connect through public IP it gives the above error. sometimes in the error log, it says blocked by configs. however, it still shows up in the access log. this is the vhosts file:
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "C:/wamp64/www"
<Directory "C:/wamp64/www/">
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I tried a number of things such as restating and using different devices.
edit: I get the same error even if the server is offline.
Related
Looking for help on server problem. I have followed the following steps to set up LAMP on the VM
https://cloud.google.com/community/tutorials/setting-up-lamp
I put my Laravel 5.4 website onto the VM, configure the .env for the following:
APP_URL=website_external_IP
But when I access the website by inserting the website_external_IP on my browser, it returns the following image.
Sorry for being noob of server problems but please let me know what else information should I provide for you to figure out the cause of it. Thank you!
1 EDIT:
In response to John Hanley's suggested site. I further made the following edits on the apache conf:
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/laravel_project.conf
sudo vim /etc/apache2/sites-available/laravel_project.conf
and there vim the laravel_project.conf as followings
NameVirtualHost *:8080
Listen 8080
<VirtualHost *:8080>
ServerAdmin admin#example.com
ServerName laravel.dev
ServerAlias www.laravel.dev
DocumentRoot /home/user/projects/laravel_project/public
<Directory /home/user/projects/laravel_project/public/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
LogLevel debug
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
then
sudo vim /etc/hosts
and add the following line:
127.0.0.1 laravel.dev
then disabled the original conf settings and enable for my site:
sudo a2dissite 000-default.conf
sudo a2ensite laravel_project.conf
Without having the full understanding of the new edits procedures, accessing the page with IP returns the following error:
You don't have permission to access / on this server.
Your Apache web server has directory browsing enabled. Also you do not have a default page present (or enabled) therefore you server is serving up the directory listing.
/etc/apache2/apache2.conf
Remove the word Indexes from this part of your configuration:
<Directory /var/www/>
Options Indexes FollowSymLinks
...
</Directory>
I am trying to use Ionic’s Devapp to test some functionality on my phone. I think that WAMP is not allowing the requests to make it through my virtual server. I am using WAMP 3.1.3 with Apache 2.4 and I think I have it configured correctly, but requests are still not being received. I am using windows 10 and have tried to take down my firewall and allow access through my firewall, but I still have not achieved the results and looking for I was wondering if anyone had any suggestions for me to listen to the specific port provided by the ionic server and that’s used by Devapp with wamp. Does it make a difference that it's a phone? Thanks for your help.
hostd.conf
Listen 0.0.0.0:80
Listen [::0]:80
Listen 0.0.0.0:8001
Listen [::0]:8001
Httpd-vhosts.conf
<VirtualHost 127.1.2.3:80>
ServerName sam
DocumentRoot "c:/wamp64/www/x/public "
<Directory "c:/wamp64/www/x/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:8001>
ServerName example.dev
DocumentRoot "c:/wamp64/www/x/public"
<Directory "c:/wamp64/www/x/public">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
Require ip 192.168
</Directory>
</VirtualHost>
The format of a Require ip does not use the x, x.y part
Just use
Require ip 192.168
and that means any ip starting with 192.168
So if your router is using 192.168.1.* then use
Require ip 192.168.1
to mean any ip on that subnet from 192.168.1.1 to 192.168.1.255
This answer may also help with connecting from your phone
I'm running Wamp 3.0.0 64bit on Windows 10. In past versions the icon was either red, orange or green depending on status. Now the green version has a red dot in it, and the background color is pale yellow rather than clear as it is on the red and orange versions.
Does anyone know the significance of the background color or the red dot?
It seems I gave you some wrong advice above in my comments.
The icon you speak about is in fact a new Icon I had forgotten about.
This image indicates that you have set WAMPServer Online i.e. you have used the Online/Offline menu and set Apache to be Online.
NOTE: It is not necessary to have set Apache Online for normal development activity. Online only means that Apache can be accessed by any IP Address in the universe.
In other words when Online the httpd.conf file contains this parameter in the
<Directory "D:/wamp/www/">
section on httpd.conf
# onlineoffline tag - don't remove
Require all granted
when normally it has
# onlineoffline tag - don't remove
Require local
Unless you are actually trying to access your site from the internet it is not required to be Online.
Additional info after clarification
Ok, so if you are just trying to open up to connections from your local network then you have to do this. WAMPServer3 added the use of localhost as a Virtual Host by default. So now you should leave the httpd.conf files as
# onlineoffline tag - don't remove
Require local
Now edit \wamp\bin\apache\apache{version}\conf\extra\httpd-vhost.conf and add your access requirements to that like this
The default is this
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
So just add requirements like this
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require local
Require ip 192.168.0.1
Require ip 192.168.0.2
</Directory>
</VirtualHost>
Or add this for any ip in your local network
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require local
Require ip 192.168.0
</Directory>
</VirtualHost>
can anyone help with a following issue:
I am using wamp to run projects in my chrome browser.
after adding a newAlias which points to my project directory c:/dev/myProject
I am getting Forbidden message: you don't have permission to access /newAlias on this server.
I can access default Aliases such as phpmyadmin, webgrind...
but i cannot access my own.
I am using WampServer Version 2.5 64bit on Win 8.1 64bit located in c:/wamp.
I tried basic stuff from the net but with no luck.
Any suggestions?
Edit: content of newAlias:
Alias /bs1/ "c:/_DEV_/git/NewProject/www/"
<Directory "c:/_DEV_/git/NewProject/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>
Dont change that section of your httpd.conf. Those few lines control access to the root folder of the drive that Apache is installed on. So you just gave full access to anybody with a handy hack.
The process of securing the access via Apache is to deny all access to everything from the root folder and below, and then selectively allow access for specific sites to specific areas/folders of the drive.
A better solution would be to change httpd.conf back to how it was and make the change in your Alias definition. Like this :-
Alias /bs1 "c:/_DEV_/git/NewProject/www/"
<Directory "c:/_DEV_/git/NewProject/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require local <-- to develop on this PC
Require ip 192.168.1 <-- to access the server from another PC on your network
Require all granted <-- to allow the world to see the beauty of your site
</Directory>
It is actually a better idea to use Virtual Hosts to control each site and not Alias's.
Here is a why and Howto :- WAMPServer 2.5 The Homepage, Your Projects Menu and the need for Virtual Hosts
I've updated WAMP from 2.2.22 to 2.4.9 and found that new aliases didn't work (same error message as yours).
Checking the default aliases like phpmyadmin, I've found this:
Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"
# to give access to phpmyadmin from outside
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#
<Directory "c:/wamp/apps/phpmyadmin4.1.14/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</IfDefine>
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>
If you see the contents of the file you'll notice the <IfDefine APACHE24> and <IfDefine !APACHE24> conditionals. So I've changed my alias .conf file from:
Alias /svn "c:/work/website-svn/"
<Directory "c:/work/website-svn/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>
to:
Alias /svn "c:/work/website-svn/"
<Directory "c:/work/website-svn/">
Options Indexes FollowSymLinks MultiViews
Require local
</Directory>
That solved my problem, I hope it solves yours.
I am no expert on this but the answer above seemed like I was granting access to my entire computer...So tried modifying the above answer to only giving access to where my alias folder is...
So instead...Go to the httpd.conf file...and do a search for...
<Directory />
AllowOverride none
Require all denied
</Directory>
and below that add the following
<Directory "c:/path-to-your-alias-folder...">
AllowOverride none
Require all granted
</Directory>
This worked to me and I think it might be a bit safer...Again I am no expert here...Just trying to make it work...
for allow permission for your server & wamp you require 3 steps please ensure these 3 things after that you can access your site from other network with ip address e.g http://192.168.1.1/yoursitefoldername
(192.168.1.1 is you computer or vps ip address "yoursitefoldername" is folder name of your site which should be in your wamp->www folder)
1.
first of all
Port 80 and 443 must be allow for both TCP and UDP packets. To do this, create 2 inbound rules for TPC and UDP on Windows Firewall for port 80 and 443.
(or you can disable your whole firewall for testing but permanent solution if allow inbound rule)
2.
If you are using WAMPServer 3 See bottom of answer
For WAMPServer versions <= 2.5
You need to change the security setting on Apache to allow access from anywhere else, so edit your httpd.conf file.
Change this section from :
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
To :
# onlineoffline tag - don't remove
Order Allow,Deny
Allow from all
if "Allow from all" line not work for your then use "Require all granted"
then it will work for you.
WAMPServer 3 has a different method
In version 3 and > of WAMPServer there is a Virtual Hosts pre defined for localhost so dont amend the httpd.conf file at all, leave it as you found it.
Using the menus, edit the httpd-vhosts.conf file.
It should look like this :
<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp/www
<Directory "D:/wamp/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
Amend it to
<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp/www
<Directory "D:/wamp/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Hopefully you will have created a Virtual Host for your project and not be using the wamp\www folder for your site. In that case leave the localhost definition alone and make the change only to your Virtual Host.
3.
Dont forget to restart All Services of Wamp or Apache after making this change
I found a solution which worked for me.
In httpd.conf i changed:
<Directory />
AllowOverride none
Require all denied
</Directory>
to
<Directory />
AllowOverride none
Require all granted
</Directory>
Which solved the issue and allowed me to access my custom aliases.
I would suggest that you consider setting up virtual hosts instead. It takes a few more minutes, but it's more bulletproof. RiggsFolly's answer to a similar question is excellent in its detail, rigor, and utility:
Project Links do not work on Wamp Server
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Question
I have tried and read all sort of questions on this topic but can't get this to work. I am trying to use a virtual host to access a different folder than the default /www that wamp uses. But i keep getting an error;
Forbidden
You don't have permission to access / on this server.
I can access local host and phpmyadmin perfectly but not any virtual hosts that i create.
httpd-vhosts.conf
# Virtual Hosts
#
# Required modules: mod_log_config
Listen 80
<VirtualHost *:80>
ServerAdmin admin#localhost.com
DocumentRoot "C:\Program Files (x86)\2. Apps\Wamp\www"
ServerName localhost
<Directory "C:/wamp/www">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin#localhost.com
DocumentRoot "C:\Users\Chris\Documents\CBull Files\Projects\Tests"
ServerName test.lo
ServerAlias test.lo
<directory "C:\Users\Chris\Documents\CBull Files\Projects\Tests">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</directory>
hosts
# Wamp Server Settings
127.0.0.1 localhost
127.0.0.1 test.lo
httpd.conf
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
Thanks
Thanks for everyone's input, there were two main problems
I installed wamp into a folder which was nested in a folder who's name had a space in so c:/folder/folder with a space/wamp/ which i have since been told is bad practice, if anyone knows why please tell.
The were issues with the internet protocol, namely ipv6, so solve this you need to ensure wamp only uses ipv4, inside httpd.conf find Listen 80 and change to Listen 0.0.0.0:80. Again i'm not sure what this does so if anyone knows please post below.
I hope this helps anyone else stuck.
Try replacing the following block with:
<VirtualHost test.lo:80>
ServerAdmin admin#localhost.com
DocumentRoot "C:\Users\Chris\Documents\CBull Files\Projects\Tests"
ServerName test.lo
ServerAlias test.lo
<directory "C:\Users\Chris\Documents\CBull Files\Projects\Tests">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</directory>
</VirtualHost>
I have made just one change: <VirtualHost *:80> replaced with <VirtualHost test.lo:80>.
Note: You had </VirtualHost> missing in the end.