I have seen alot alot of guides how to fox the AH01630 error and some httpd corrections and tweaks.
Surely some will be annoyed me asking for help on this specific topic but I was trying to figure out for hours how to fix my issue.
What did I do?
I have port-forwarded the required ports for Apache and MySQL
I installed WAMP on my computer
I tried to config. httpd
I read about 50 topics according to make my server public accessible
-
I tried to set up the whole thing on a fresh virtual machine
I reinstalled WAMP a few times
So what doesn't work?
The usual access refuse message: Forbidden You don't have permission to access / on this server.
-I found this in the error log: AH01630: client denied by server configuration
I have tried to fix the issue by my own and couldn't proceed further after hours, maybe I forgot a little detail or just something I have to know but I don't because I am uneducated in this specific area
Thanks in advance
Here are the logs and config, if you don't mind and know how to fix the problem send me the finished file
httpd.conf
apache_error.log http:// pastebin. com/YSZDc0tp
access.log http:// pastebin. com/xfwv5ebB
In WAMPServer 3+ there is a Virtual Host defined for localhost by default, and that is where you should make the access amendments and not in httpd.conf
So in httpd.conf replace
# onlineoffline tag - don't remove
Require all granted
</Directory>
With
# onlineoffline tag - don't remove
Require local
</Directory>
Edit \wamp\bin\apache\apache\apache2.4.18\conf\extra\httpd-vhosts.conf and replace Require local with Require all granted
EG
#
# Virtual Hosts
#
<VirtualHost *:80>
ServerAdmin webmaster#homemail.net
ServerName localhost
DocumentRoot E:/wamp/www
<Directory "E:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Related
I have a program called ‘project’ that I run from wamp, and everything goes correctly, the problem is that I'm getting the following warning every time I launch wamp:
It's a bad idea to add localhost in the url of launching projects. It is best to define VirtualHost in
wamp/bin/apache/apache2.4.37/conf/extra/httpd-vhosts.conf
file and not add localhost in the url.
I know there are similar questions with solutions, I have been reading several forums with solutions to solve the problem but I can not get the warning to disappear. In httpd-vhosts.conf I have the following:
# 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>
Can you help me solve it? I get the same warning even if I replace 'localhost' in serverName and ServerAlias with: C:/wamp64/www/project/
My wamp version is 3.1.7 - 64bit:
Within c:\wamp64\wampmanager.conf under [options] you should see urlAddLocalhost = "on", try switching its value to off and restart WAMP.
I'm sorry that I couldn't find any documentation that explains it. I know it because I was looking for something that could link my projects directly from http://localhost and tracked this option from the WAMP scripts. When I enabled it the warning started to show.
PS.: I'm afraid this method I described works only for WAMPSERVER >v3.1
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>
When I try to access my local website from another device (connected with LAN), I get Forbidden error.
I tried to edit Apache's httpd.conf (as what google told me), repair vcredist packages, uninstalling wamp completely and installing (re-downloaded the latest version), deactivating Antivirus software (I am using BitDefender btw).
About 1 month ago, I was using windows 7 and wamp was working perfectly. After I upgraded to windows 10, I cleaned my pc and installed wamp. At first, I didn't need it's Online mode, but right now, I need it. So, I am open to all new ideas.
Note
-I can reach localhost with my pc (with LAN IP, Router IP and http://localhost)
-I am using Windows 10 Professional x64
-I looked at all of the similar questions and relevant pages on Google, and none of them worked for me
About 3 weeks ago, I started using a new router. Can it cause this problem? or maybe I couldn't install drivers correctly?
don't edit http.config instead edit httpd-vhosts.config
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
change Require local to Require all granted. when it is Require local it can be accessed only through localhost request from other hosts are denied. Finally it looks like below
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I have a quick issue. I am trying to use Laravel for the first time. To do so, I'm using Wamp. And I don't know if this is important, but I set the DocumentRoot of wamp at this address :
DocumentRoot "C:\Users\Bebop\Documents\Site Internet/"
I using wamp for a lot of different websites in a folder called Sites. When I access to one of the site I go to : localhost/Sites/thewebsite. So really what I want is just to get rid of the public folder in the path to the Laravel website.
For the moment I've did :
Change httpd.conf of apache to include vhosts.conf :
Include conf/extra/httpd-vhosts.conf
Created a new Virtual hosts and configured the directory like so :
DocumentRoot "C:/Users/Bebop/Documents/Site Internet/Sites/LaravelTest/public"
ServerName Sites/LaravelTest
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
After that I added a new host in the file located at C:\Windows\System32\drivers\etc
127.0.0.1 localhost
127.0.0.1 Sites/LaravelTest
By doing this, when I go to localhost I get redirected to the Laravel websites. But I would like to go to localhost/Sites/LaravelTest, because now I can't access to all my other websites.
Does anyone know how to do that ?
Thanks a lot for your help
Assuming that you want to reach your Laravel site at: http://localhost/LaravelSite/
You can either use an alias in your httpd.conf file:
Alias /LaravelSite/ "C:/Users/Bebop/Documents/Site Internet/Sites/LaravelTest/public/"
<Directory "C:/Users/Bebop/Documents/Site Internet/Sites/LaravelTest/public">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
or, create a symbolic link under command-prompt with the following:
mklink /D "C:\Users\Bebop\Documents\Site Internet\Sites\LaravelSite" "C:\Users\Bebop\Documents\Site Internet\Sites\LaravelTest\public"`
Evening everyone,
Firstly, I apologize if this is the best location to ask this question so feel free to redirect me or this post :)
I have WAMP installed on C: but any projects will exist on a separate drive. I can create an alias to point to the correct directory just fine - no problem there. The problem lies in the fact that I want/need to have a custom URL assigned to each project (so instead of localhost/mysite it would be something similar to mysite.dev).
I found this article, but it's a bit old so I'm not sure if the information is still accurate. Here's what I have so far:
Edited hosts file to add domain - 127.0.0.1 mysite.dev
Edited WAMP's httpd.conf file to uncomment - Include conf/extra/httpd-vhosts.conf
Edited WAMP's httpd-vhost.conf file to add virtual host:
<VirtualHost 127.0.0.1>
DocumentRoot "d:/projects/mysite/"
ServerName mysite.dev
ServerAlias mysite.dev
<VirtualHost>
In the end this produces no errors, just a big fat 403 Forbidden Access "You don't have permission to access / on this server."
No idea where to go from here, this isn't exactly my area of expertise :P any and all help/tips are greatly appreciated! Thanks!
Try setting a port to listen for
<VirtualHost *:80>
DocumentRoot d:/projects/mysite/
ServerName mysite.dev
</VirtualHost>
After another hour or two I can actually answer my own question.
Someone on another forum mentioned that you need to keep a mention of plain ol' localhost in the httpd-vhost.conf file, so here's what I ended up with in there:
<VirtualHost *:80>
ServerName localhost
DocumentRoot "c:/wamp/www/"
</VirtualHost>
<VirtualHost *:80>
ServerName platypus.dev
DocumentRoot "d:/projects/test/"
<Directory "d:/projects/test/">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Exit WAMP, restart - good to go. Hope this helps someone else :)
Depending on which WAMP stack you're using, different, but very silimar configs in every stack. WAMP = (apache, mysql, php FOR Windows ... Win Ap My Php). There are different WAMP stacks, AMPPS, XAMPP, Bitnami.. You probably meaned WAMPserver (most people call it simply WAMP, but can mean also others, which has slightly different configs..)
If you're using WAMPserver, I think it's the easiest to config a "custom URL", that means virtual host. You just need to uncomment the vhosts config file in httpd.conf in apache's folder, and you already have a template of how to set virtual host in this file, there are 2 dummy hosts as examples. But, don't forget the Windows' "hosts" file, you need to set 127.0.0.1 [url_you_want] in your hosts file, and that [url_you_want] is the same in your apache vhosts config file as "ServerName"...