I've edited my httpd.conf, and I'm still getting the error:
"Forbidden. You don't have permission to access / on this servers"
I'm trying to allow everyone to access my WAMP website. I added this into my httpd.conf file:
<Directory />
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
After restarting my WAMP server, I'm still getting the error when I don't access my site from my local machine.
I'm using WAMPServer 2.5 which has Apache 2.4.9.
The section of httpd.conf you changed protects the drive that Apache is installed on and should be set to
<Directory />
AllowOverride none
Require all denied
</Directory>
Now the section of httpd.conf that you need to look for is this one
it starts with
<Directory "c:/wamp/www/">
and inside that section there is a line like this
# onlineoffline tag - don't remove
Require local
To allow access from any ip address change it to this
# onlineoffline tag - don't remove
Require all granted
You should be able to do this by using the wampmanager menus like so:
wampmanager -> Put Online
However if you have changed the section of code around the # onlineoffline tag - don't remove line, the automatic edit done by using the menus may not work, so its probably easier to do it manually, or at least check that the menu controlled edit worked properly.
Change DirectoryRoot to <Directory c:/wamp/www>
Make sure the ownership and permissions of C:\wamp\www
User: yourusername
Permission: Allow - Read and execute and Read permissions
you should try this:
Edit C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf (apache2.4.9 might be different, depends on your apache version)
Scroll all the way down until you find Deny from all and change that too Allow from all
EDIT Answer to #Bonner
Your permissions are still wrong
If they still wrong, please provide the right permission, instead of just point it out. Based on "my poor knowledge" I think the permission are fine.
you have failed to ask whether the WAMP tray icon is appearing or not
Based on question description
After restarting my WAMP server,
I assumed WAMP tray appears.
If you make changes to the httpd-vhosts.conf they will be overwritten by the tray icon software when an option is changed
False. WAMP Control Panel let you edit configuration files like my.ini, httpd.conf, php.ini, etc. However, you can't edit httpd-vhosts.conf from WAMP Control Panel.
Related
My localhost was working without issue when I tried to follow this guide (https://davidsword.ca/development/setting-up-localhost-apachephp-on-icloud-drive/#comment-1974) to set iCloud as the localhost folder instead of /User/myusername/Sites. To be safe I copied the httpd.conf and username.conf files just in case. I didn't get iCloud working as localhost so deleted the updated httpd.conf and username.conf files and reverted to old ones.
Since then I can only get onto my localhost via http://localhost/~myusername/ and get a 403 error when accessing http://http://localhost (which always worked previously)
The phpinfo file is still showing the DOCUMENT_ROOT to be the iCloud one from the guide, even though in the httpd.conf file it shows the following:
DocumentRoot "/Users/myusername/Sites/"
<Directory "/Users/myusername/Sites/">
Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride All
Require all granted
</Directory>
I've restarted Apache and the macbook several times but it won't update. Is there somewhere else this is stored or a cache of something I can clear to force it to update?
I understand I can set up a virtual host to work around this but I'd rather update the documentroot if possible - thanks
I just got a VPS and it's running CentOS 6.8 with WHM 58.0. I really don't want the WHM, I only want to add one site to the server. So I just installed an FTP server and uploaded the files to the Apache root dir at /usr/local/apache/htdocs and gave all files chmod 777.
All works good, but when I go to PHP or ajax to PHP I get "403 Forbidden". I suppose the problem is in the http.config but I really have no idea. Here is my http.conf file and I don't have any .htaccess files.
Among other things, you want to make sure that the Linux user that is running Apache has permission to read and execute the PHP files where they are on the server.
This is a good guide for transferring PHP files and setting the permissions using PHP: https://www.digitalocean.com/community/tutorials/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server
There's also a guide here to setting up the server and checking that PHP is set up correctly here, but I assume you have done this already: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
I just replace this
<Directory "/usr/local/apache/htdocs">
Options Includes Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
With this
<Directory "/usr/local/apache/htdocs">
Options Indexes
Order allow,deny
Allow from all </Directory>
I'm having a problem where it seems like my Vagrant VirtualBox isn't reading the .htaccess file for a site I have mapped out. (a proccesswire site)
I've don't know enough about Vagrant to find where I should be editing the directives so that my .htaccess file will be read. As far as I've gathered from searching I need to set a directive like so:
<Directory /var/www>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
It seems the primary offender is the AllowOverride is typically set to "None" and needs to be "All". But I have put this in a httpd.conf file in apache and I'm guessing that isn't correct.
A bit more information: When I installed PW in the site root I got this error: " Unable to determine if Apache mod_rewrite (required by ProcessWire) is installed. ". As a result when I try to access a part of the CMS, that is usually handled by rewrite rules, the url (/admin or /processwire by default) just reroutes me to the homepage.
Also, I can delete everything in .htacess or add garbage to it and no errors occur. This tells me that .htacess isn't even being read.
I appreciate the help.
I have Wamp Server installed on a Windows Server 2008. It's working fine on local, and here is my phpmyadmin.conf :
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
Options Indexes FollowSymLinks ExecCGI
AllowOverride all
Order Allow,Deny
Allow from all
Allow from ::1
</Directory>
The problem, is that I can access to phpmyadmin from my computer with servername/phpmyadmin, but I can't access to my websites nor the index page with servername/ or servername/site.
The port is 80.
I have this error :
Forbidden
You don't have permission to access /glpi on this server.
If you wish to allow access to your site in \wamp\www\glpi then the best solution is to create a Virtual Host but if you just want a quick solution all you need to do is use the wampmanager menu as follows :-
wampmanager -> Put Online
This will make the correct change, which is to change the httpd.conf file.
Here is a link to another answer on how and why to create Virtual Hosts, it is aimed at WAMPServer 2.5 but it will work just as well for WAMPServer 2.4 Project Links do not work on Wamp Server
For those who this was not obvious, the error came from the first line :
<Directory "c:/wamp/apps/phpmyadmin4.0.4/">
This only give access to the phpmyadmin directory. So the solution is to replace or add a new block with :
<Directory "c:/wamp/www/">
And now you'll gain the access to your websites from another computer.
I have created a server using the Apache httpd, mysql and PHP. I have installed phpmyadmin. but if I try to access through my browser I am getting a blank page instead of login. what I can do for this?
I can't comment as my reputation isn't high enough on here.
However, if you post the steps you've already implemented I'm sure somebody can help. As it is you've given no helpful information.
A few things to check:
Have you checked your apache error logs?
/var/log/httpd/error_log
Have you created a 'Directory' directive to allow permission?
<Directory "/usr/share/phpmyadmin">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
Have you added an alias in your httpd.conf or virtual host configuration to enable access?
Alias /phpmyadmin /usr/share/phpmyadmin
You can enable php logging using the instruction mentioned here:- enter link description here
By checking the php log you can make sure whether it's been caused by high memory requirement.
Also make sure the permissions & ownerships of the phpmyadmin files are correct.