Forbidden Error On Localhost
Contents |
13 CommentsOS X 10.10 / 10.9 Sites Folder Sharing Not WorkingIf your user personal web sharing is not working for a user but is OK at the other document root localhost level, the issue may be a configuration file for the
Localhost Forbidden Wamp
user.The higher document root level of http://localhost/ displays "It Works" but when going localhost 403 forbidden mac to the user level, http://localhost/~username/ you get the:Forbidden 403, You don't have permission to access /~username/ on this serverCheck that you localhost 403 forbidden ubuntu have a "username.conf" filed under:/etc/apache2/users/If you don't, then create one named by the short username of the account with the suffix .conf:Find your short username by typing in the TerminalwhoamiChange directory into the
Localhost Access Forbidden Xampp
right directory:cd /etc/apache2/userssudo nano username.confFor OSX 10.9 Apache 2.2Then add the content below swapping in your username:
Apache Forbidden You Don't Have Permission To Access
is documented at Apple.Restart apache sudo apachectl restartThen all should be good.Changing The Apache Web UserOne of the frustrations of using the Users/username/Sites folder is the permissions issues with things like updates and authentication.This is because the default webserver user which runs httpd is known as _www, which will not be the user in your local account. If your machine is only in use by you and the webserver will run only under your account then you can change the user.Change this back in /etc/apache2/httpd.confJust change it to your username and group, group will be staff and restart Apache sudo apachectl restartShare this:TwitterGoogleFacebookRelatedCats: macOS, Tech Tags: apache, mac, OSX, permissions, sharing, web Mike Uwins Thanks man. Looked all over for a fix for this and this nailed it in one. 🙂 Daniel Shanahan This video was very helpful (http://youtu.be/cMhSyxmbHu0), even though it was on a Windows machine; a change may be needed in httpd.conf file (/etc/apache2/httpd.conf) from this: # First, we configure the "default" to be a very restrictive set of # features. # Options FollowSymLinks AllowOverride None Order deny,allow Deny from all to this# First, we configure the "default" to be a very restrictive set of # feature
here for a quick overview of the site Help Center Detailed answers apache 2.4 forbidden to any questions you might have Meta Discuss the
Apache 403 Forbidden Windows
workings and policies of this site About Us Learn more about Stack Overflow the company apache 403 error Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the https://coolestguidesontheplanet.com/forbidden-403-you-dont-have-permission-to-access-username-on-this-server/ Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 403 Forbidden error when accessing localhost on Mac OS X10.8 up vote 7 down vote favorite 3 I have followed this tutorial to http://stackoverflow.com/questions/18750184/403-forbidden-error-when-accessing-localhost-on-mac-os-x10-8 set up Apache, MySql and PHP on Mac OS X 10.8 (http://coolestguyplanettech.com/downtown/install-and-configure-apache-mysql-php-and-phpmyadmin-osx-108-mountain-lion) When I go to 'Localhost' I get the following error: Forbidden You don't have permission to access / on this server. When I go to 'Localhost/~benthompson' it works fine. When I was halfway through the tutorial, 'Localhost' did work, its something later on that stopped it working. Presumably its a permissions issue, but where? apache permissions osx-mountain-lion share|improve this question asked Sep 11 '13 at 20:01 Ben Thompson 1,27652138 add a comment| 1 Answer 1 active oldest votes up vote 27 down vote accepted To fix that issue check this link http://www.coolestguidesontheplanet.com/downtown/how-set-virtual-hosts-apache-mac-osx-109-mavericks-and-osx-108-mountain-lion read the "Losing Localhost" part. The error occurs just after you enable vhosts in the httpd.conf file. By uncommenting this line: Include /private/etc/apache2/extra/httpd-vhosts.conf Adding this in the httpd-vhosts.conf will fix your issue. Just remember to add new vhosts before this one :D here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about http://superuser.com/questions/68857/403-forbidden-error-when-trying-to-view-localhost-on-apache Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer http://askubuntu.com/questions/340212/403-forbidden-clean-apache2-install enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top 403 forbidden 403 Forbidden Error when trying to view localhost on Apache up vote 4 down vote favorite 3 I think my Apache must be all screwed up. I don't know if it ever worked. I just upgraded to Snow Leopard, and the first step on this tutorial is to start apache and check that it's working by opening http://localhost. It starts fine but when I go to localhost I get a 403 localhost 403 forbidden forbidden error. I don't know where to start figuring out how to fix it, so I wonder if a fresh install of Apache would do the trick. What do you think? Update: I found some error logs in /private/var/log/apache2/. Found this in one of the logs. Not sure what it means: [Tue Nov 10 17:53:08 2009] [notice] caught SIGTERM, shutting down [Tue Nov 10 21:49:17 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist httpd: Could not reliably determine the server's fully qualified domain name, using Andrews-Mac-Pro.local for ServerName mod_bonjour: Skipping user 'andrew' - cannot read index file '/Users/andrew/Sites/index.html'. [Tue Nov 10 21:49:19 2009] [notice] Digest: generating secret for digest authentication ... [Tue Nov 10 21:49:19 2009] [notice] Digest: done [Tue Nov 10 21:49:19 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k DAV/2 PHP/5.3.0 configured -- resuming normal operations Update: I also found something in the dummy-host.example.com-error_log file. I didn't set these dummy-host things by the way. Is this the default configuration? [Tue Nov 10 21:59:57 2009] [error] [client ::1] client denied by server configuration: /usr/docs Update: Woohoo! I found the file that had the virtual host definitions. It was in /etc/apache2/extra/httpd-vhosts.conf. It had those two dummy virtual host communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top 403 Forbidden clean apache2 install up vote 3 down vote favorite 3 I recently reinstalled Ubuntu and then installed the lamp-server bundle via tasksel and the installation went fine. I had backed up the files from the /var/www/ folder and planned to just place them back once the server was back online (or in my case, accesible from my computer only - it's a test server.) The installation completed and so I tried to copy the files over from the backup directory. This went fine. However, when I try to access the server via localhost from Firefox I get a 403 Forbidden error, which I never had before. HELP!! EDIT: 9/2/2013 Added info about file happenings So, I followed what @Andrew said, but I still can't access any .html files. Strangely enough, I can access the .php files (nothing displayed of course, as they only display the info pulled from a previously completed form.) But no html access, just the Forbidden You don't have permission to access /index.html on this server. page server permissions apache2 lamp share|improve this question edited Sep 2 '13 at 16:24 asked Sep 1 '13 at 22:09 RPi Awesomeness 4,965104283 Why did this work? It just worked for me.. can someone explain? I am a real hit and miss guy at this stuff, copying and pasting whatever I can... I know, I'm a nightmare. –user254924 Mar 5 '14 at 7:13 add a comment| 2 Answers 2 a