HTTP/1.1 403 Forbidden [googlebot] - php

i really need your help..
my websites ranking is now loosing because of this error, and i don't know how to fix this.. even my web hosting provider can't fix this.
when i fetch as google there's an error
Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to
use an ErrorDocument to handle the request.
and also when i view my website via googlebot 2.1 using user agent switcher i got that error too, and when i test my sitemaps on webmaster tool, i got
General HTTP error: HTTP 403 error (Forbidden) HTTP Error: 403
and hope you guys help me..
this is my
.htaccess
BEGIN WordPress
RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}
!-d RewriteRule . /index.php [L]
END WordPress
this i my website: http://www.naruto-tv.info
all subdomain and other domain that i'm using right now had a same problem and hosted on same server. but i have one subdomain that hosted on other server and working fine.
i also already contacted my server provider but they can't fix it.
ERROR LOGS:
[Mon Apr 14 14:02:28 2014] [error] [client 66.249.77.159] client
denied by server configuration:
/home/markgelo/public_html/markgiver/403.shtml
[Mon Apr 14 14:02:28 2014] [error] [client 66.249.77.159] client
denied by server configuration:
/home/markgelo/public_html/markgiver/page
[Mon Apr 14 14:02:20 2014] [error] [client 199.21.148.45] client
denied by server configuration:
/home/markgelo/public_html/markgiver/403.shtml
[Mon Apr 14 14:02:20 2014] [error] [client 199.21.148.45] client
denied by server configuration:
/home/markgelo/public_html/markgiver/carimi-invasion-2013-itunes-aac-m4a-album
[Mon Apr 14 14:02:15 2014] [error] [client 66.249.74.183] client
denied by server configuration: /home/markgelo/public_html/403.shtml
[Mon Apr 14 14:02:15 2014] [error] [client 66.249.74.183] client
denied by server configuration: /home/markgelo/public_html/2013
[Mon Apr 14 14:02:07 2014] [error] [client 37.59.30.32] client denied
by server configuration:
/home/markgelo/public_html/markserves/403.shtml
[Mon Apr 14 14:02:07 2014] [error] [client 37.59.30.32] client denied
by server configuration: /home/markgelo/public_html/markserves/2013
[Mon Apr 14 14:02:06 2014] [error] [client 66.249.74.183] client
denied by server configuration: /home/markgelo/public_html/403.shtml
[Mon Apr 14 14:02:06 2014] [error] [client 66.249.74.183] client
denied by server configuration: /home/markgelo/public_html/tag
[Mon Apr 14 14:02:05 2014] [error] [client 142.4.208.99] client denied
by server configuration:
/home/markgelo/public_html/markgiver/403.shtml
[Mon Apr 14 14:02:05 2014] [error] [client 142.4.208.99] client denied
by server configuration: /home/markgelo/public_html/markgiver/2013
[Mon Apr 14 14:02:05 2014] [error] [client 66.249.77.99] client denied
by server configuration: /home/markgelo/public_html/android/403.shtml
[Mon Apr 14 14:02:05 2014] [error] [client 66.249.77.99] client denied
by server configuration: /home/markgelo/public_html/android/
[Mon Apr 14 14:02:05 2014] [error] [client 37.59.42.24] client denied
by server configuration:
/home/markgelo/public_html/markgiver/403.shtml

Seems that it is not .htaccess error as it seems that it is vhost settings problem generally. I you have purchased shared hosting then request you contact your service provided to resolve the issue for HTTP/1.1 403 Forbidden problem for bots.
There can be two reasons for the problem but you need Administrative access to server to resolve the issue:
First
First Reason is the directories hosted outside of the default /var/www/. Apache requires permissions to all the directories all the way up to the root of the file system where the site is hosted. In case using default location setting are automatically done and if the settings are default then this doesn't apply to you.
For example, you've got a development machine and your site's directory is:
/abc/home/mywebsite/
You may think you can get away with:
chgrp -R www-data /abc/home/mywebsite/
chmod -R 2750 /abc/home/mywebsite/
because this gives Apache permissions to access your site's directory? Well that's correct but it's not sufficient. Apache requires permissions all the way up the directory tree so what you need to do is:
chgrp -R www-data /abc/
chmod -R 2750 /abc/
Obviously I would not recommend giving access to Apache on a production server to a complete directory structure without analysing what's in that directory structure.
Second
Global Setting in the global directory setting in the httpd.conf or in the specific directory block in httpd-vhosts.conf:
Options Indexes FollowSymLinks Includes ExecCGI
By default, your global directory settings is (httpd.conf line ~188):
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
set the options to :
Options Indexes FollowSymLinks Includes ExecCGI
Finally, it should look like:
<Directory />
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
Let me know if the issue doesn't resolved.
Editing
Ok. So, the service Provider is not ready to Change setting as it is shared server. Then you must request him to change your hosting changes only through http-vhosts.conf as:
<VirtualHost *:80>
DocumentRoot "abc" #Your Server root directory
ServerName def #Your Website name.
<Directory "abc"> #Your Directory Changes
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
This will only effect your hosting setting not the other web hosting provided on shared server. Request them to change this. Hoping that they would change these setting this time.

Related

Invalid command 'location', perhaps misspelled or defined by a module not included in the server configuration

Currently, I am setting my local environment for a project.
Project runs on production environment with nginx server. But in the local development, using apache server. I've installed LAMP stack on my ubuntu machine. There is already a virtual host file provided and I have setup it. So far I've created xxx.conf file under /etc/apache2/sites-available.
The file includes:
<VirtualHost *:80>
ServerName xxx
DocumentRoot /home/ubuntuser/Downloads/xxx-master/public
<Directory "/home/ubuntuser/Downloads/xxx-master/public">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride all
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/xxx-error.log
CustomLog ${APACHE_LOG_DIR}/xxx-access.log combined
SetEnv ENVIRONMENT "development"
</VirtualHost>
I also created .htaccess file under /home/ubuntuser/Downloads/xxx-master/public. The content of this file downloaded from production environment.
The content of .htaccess file is:
RewriteEngine On
RewriteBase /
location ~ ^/site { rewrite ^/site(.*)$ https://local.xxx.com/$1 redirect;}
So, when I type local.xxx.com in browser, it gives 500 Internal Error.
So, I was defined xxx-error.log in virtual host config file. I've opened it. The content is:
[Tue May 28 22:23:33.231851 2019] [core:alert] [pid 5677] [client 127.0.0.1:56504] /home/ubuntuser/Downloads/xxx-master/public/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue May 28 22:23:33.254608 2019] [core:alert] [pid 5678] [client 127.0.0.1:56506] /home/ubuntuser/Downloads/xxx-master/public/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context, referer: http://local.xxx.com/
[Tue May 28 22:33:22.300863 2019] [core:alert] [pid 6326] [client 127.0.0.1:56740] /home/ubuntuser/Downloads/xxx-master/public/.htaccess: Invalid command 'location', perhaps misspelled or defined by a module not included in the server configuration
[Tue May 28 22:33:22.317420 2019] [core:alert] [pid 6327] [client 127.0.0.1:56742] /home/ubuntuser/Downloads/xxx-master/public/.htaccess: Invalid command 'location', perhaps misspelled or defined by a module not included in the server configuration, referer: http://local.xxx.com/
So, I understand there is problem in the .htaccess but i don't know how to solve it.
You are using apache and in your .htaccess using the convention of Nginx.
Refer to latest documentation of apache2.4
To me it seems like you want to redirect use this
RewriteRule ^/site(.*)$ https://local.xxx.com/$1 or maybe this
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

Apache Server error 500 when DocumentRoot is a symlink

I have setup my fedora system, the default was that / size is 50gb while remaining drives where put on /home.
since I don't want to waste my precious 50gb for my web project I setup my apache web server as follow
since the default of apache is /var/www/html
i remove html dir and replace it with a symbolic link that points to my /home/user/www/html
note /home, /home/user, /home/user/www, /home/user/www/html have x permission for apache
my conf is like this
DocumentRoot "/var/www/html"
<Directory "/var/www">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
I already restart my httpd service and it was fine. The problem is when I try to access my index.php I get a server error. when it's index.html I get a 403.
my selinux is currently enabled and no plans on disabling it. I would Like to learn how to use it rather. so it this an selinux problem?
As I run ls -Zla on /home/user/www/html, this is the result
-rw-r--r--. 1 root root unconfined_u:object_r:user_home_t:s0 27 Dec 21 22:37 index.php
It seems that SELinux is preventing this
when accessing an html
[Mon Dec 21 23:35:33.749916 2015] [core:error] [pid 20579] (13)Permission denied: [client 127.0.0.1:45632] AH00132: file permissions deny server access: /var/www/html/index.html
when a php
[Mon Dec 21 23:39:36.801672 2015] [:error] [pid 20585] [client 127.0.0.1:45816] PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
[Mon Dec 21 23:39:36.801730 2015] [:error] [pid 20585] [client 127.0.0.1:45816] PHP Fatal error: Unknown: Failed opening required '/var/www/html/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
~
to someone that may get this problem. change the selinux type of the folder using this command.
sudo chcon -R -t httpd_sys_content_t /home/user/www
more info

Xampp images not loading even after editing httpd.conf

So I'm using Xampp on Linux to test some web pages and I'm facing an issue with loading images from the local file system onto the server
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
Now so far I've seen a lot of similar questions and I've edited the httpd.conf file accordingly as well as the directory to 'Project1_July2015' which is my folder for the project inside 'htdocs'
I've added the line 'Require all granted' as well and I still haven't found a solution to this.
The code uses ever possible combination of an image path I could come up with:
<img src="image1">
<img src="image1.jpg">
image1
<?php
$link1="img/1/image2";
$name="/image2";
$link="img";
?>
<img src="<?php echo $link;echo $name;?>">
<img src="<?php echo $link1;?>">
<img src="/opt/lampp/htdocs/Project1_July2015/image2">
So as you can see, I have 'image1' stored in the JPEG format in the folder /opt/lampp/htdocs/MyProject_2015 while 'image2'(also JPEG) is stored in a sub-folder in /img in the same path as 'image1'.
My httpd.conf file path is /opt/lampp/apache2/conf and its contents now resemble :
Alias /bitnami/ "/opt/lampp/apache2/htdocs/"
Alias /bitnami "/opt/lampp/apache2/htdocs"
<Directory "/opt/lampp/htdocs/">
Require all granted
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Is it the path to my directory that I'm messing up, the path to my image that is incorrect, or some other issue with my code?
This is how the error_log looks for the last couple of entries :
[Sun Oct 25 15:40:51.917516 2015] [core:error] [pid 4946] (13)Permission denied: [client 127.0.0.1:55332] AH00132: file permissions deny server access: /opt/lampp/htdocs/Project1_July2015/img/image1.jpg, referer: http://localhost/Project1_July2015/img/
This is all the entries in error_log since I restarted xampp in case that helps:
[Sun Oct 25 16:04:39.411323 2015] [mpm_prefork:notice] [pid 4540] AH00169: caught SIGTERM, shutting down
[Sun Oct 25 16:04:46.002063 2015] [ssl:warn] [pid 5513] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Oct 25 16:04:46.002277 2015] [ssl:warn] [pid 5513] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 25 16:04:46.002695 2015] [suexec:notice] [pid 5513] AH01232: suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Sun Oct 25 16:04:46.056649 2015] [auth_digest:notice] [pid 5514] AH01757: generating secret for digest authentication ...
[Sun Oct 25 16:04:47.002128 2015] [ssl:warn] [pid 5514] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Sun Oct 25 16:04:47.002251 2015] [ssl:warn] [pid 5514] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Oct 25 16:04:47.002607 2015] [lbmethod_heartbeat:notice] [pid 5514] AH02282: No slotmem from mod_heartmonitor
[Sun Oct 25 16:04:47.016544 2015] [mpm_prefork:notice] [pid 5514] AH00163: Apache/2.4.12 (Unix) OpenSSL/1.0.1m PHP/5.6.8 mod_perl/2.0.8-dev Perl/v5.16.3 configured -- resuming normal operations
[Sun Oct 25 16:04:47.016596 2015] [core:notice] [pid 5514] AH00094: Command line: '/opt/lampp/bin/httpd -E /opt/lampp/logs/error_log -D SSL -D PHP'
[Sun Oct 25 16:04:53.915959 2015] [core:error] [pid 5916] (13)Permission denied: [client 127.0.0.1:55552] AH00132: file permissions deny server access: /opt/lampp/htdocs/Project1_July2015/img/image1.jpg, referer: http://localhost/Project1_July2015/img/
sudo chown -R www-data:www-data /opt/lampp and editing the httpd.conf file to reflect
<VirtualHost *:80>
ServerName myhost
ServerAlias myhost.mydomain.com
DocumentRoot /opt/lampp/htdocs
<Directory "/opt/lampp/htdocs">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride None
Require all granted
</Directory>
LogLevel error
ErrorLog /opt/lampp/logs/default-http-error.log
CustomLog /opt/lampp/logs/default-http-access.log combined
instantly brought up the following errors on the page. It's not loading anymore :
Warning: session_start(): open(/opt/lampp/temp//sess_3kkj6u86hfagsndsp4hdkljct1, O_RDWR) failed: Permission denied (13) in /opt/lampp/htdocs/Project1_July2015/verify_blacklisted.php on line 2
New session start successful
3kkj6u86hfagsndsp4hdkljct1
127.0.0.1
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1017 Can't find file: './user_list/login_attempts.frm' (errno: 13 - Permission denied)' in /opt/lampp/htdocs/Project1_July2015/verify_blacklisted.php:16 Stack trace: #0 /opt/lampp/htdocs/Project1_July2015/verify_blacklisted.php(16): PDOStatement->execute() #1 /opt/lampp/htdocs/Project1_July2015/index.php(2): include('/opt/lampp/htdo...') #2 {main} thrown in /opt/lampp/htdocs/Project1_July2015/verify_blacklisted.php on line 16
Warning: Unknown: open(/opt/lampp/temp//sess_3kkj6u86hfagsndsp4hdkljct1, O_RDWR) failed: Permission denied (13) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/opt/lampp/temp/) in Unknown on line 0
IMPORTANT : So far what I didn't realize and wasn't brought to my notice either is that there are two httpd.conf files. One is in opt/lampp/apache2 /conf while the other one is in /opt/lampp/etc.
When it is suggested you edit the httpd.conf file please consider the one in /opt/lampp/etc to avoid facing issues that I faced and learnt about the hard way.
So after nearly crashing my system (purely my own mistakes), while trying to change permissions for owning the files I realized there's a simple solution to the above issue. You don't need to change ownership of the entire folder '/opt/lampp' as that may or may not cause issues (it did, for me), all you need is :
$ cd /opt/lampp/htdocs
$ whoami
This enables you to find out the owner of the folder htdocs which should be you but if it isn't simply run the command :
$ sudo chown -R www-data(rootusername):www-data(rootusername) *
Since you've already navigated to htdocs you can use ' * ' ; however, if you haven't, I'd recommend you use :
$ sudo chown -R www-data(rootusername):www-data(rootusername) /opt/lampp/htdocs
After a fresh install so far this is what worked out for me. I've lost my databases with the uninstallation so it'll be a while before I can corroborate whether the images part works or not but as for setting permissions so far this is what definitely allowed access instead of the usual 'Acces denied' message in case of different ownership of htdocs.
If even after this the images fail to load citing 'Access denied', then I suggest you navigate to the 'yourwebsite' folder in htdocs and manually change ownership for image files using the same version of the above command with *.jpg instead.
Edit: It doesn't seem to work, but now I've got issues with connecting phpmyadmin to the databases so it'll be a while before I can test it well.
SOLUTION : FINALLY SOLVED THE ISSUE
DO NOT use the 'chown' or 'chmod' command lightly. I've done that and trust me it is not a piece of cake to revert to the initial configuration after that. So I've had this problem for a while now and I finally figured out a solution to it although it's only to be used as a last resort:
sudo chmod -R 777 /opt/lampp/htdocs/path/to/image/folder
this basically gives you all permissions pertaining to all the images stored in that folder. Cheers!
In your apache2.conf, these lines should be in there:
<Directory "/">
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory "/usr/share">
AllowOverride None
Require all granted
</Directory>
<Directory "/opt/lampp">
AllowOverride All
Require all granted
</Directory>
and your httpd.conf or whichever should have these:
<VirtualHost *:80>
ServerName myhost
ServerAlias myhost.mydomain.com
DocumentRoot /opt/lampp/htdocs
<Directory "/opt/lampp/htdocs">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride None
Require all granted
</Directory>
LogLevel error
ErrorLog /opt/lampp/logs/default-http-error.log
CustomLog /opt/lampp/logs/default-http-access.log combined
</VirtualHost>
Be sure you create blank folder "logs" under /opt/lampp so it'd house your logs reports.
Then finally sudo chown -R www-data:www-data /opt/lampp.
This is updated as per Apache2.4+

PHP file is not executing code

My PHP code is not executed when I access the root directory with
http://localhost/sample.php
The code I want to run is:
<?php phpinfo(); ?>
But my code is just shown on the browser, it is not executing.
I tried to:
restart all services several times including putting WampServer online;
changing the listening port in httpd.conf to 8080.
There is not any error in the PHP error log But in Apache Error Log there are errors as following:
[Tue Jun 09 08:53:52 2015] [notice] Apache/2.2.21 (Win32) PHP/5.3.10 configured -- resuming normal operations
[Tue Jun 09 08:56:30 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/
[Tue Jun 09 08:56:30 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/
[Tue Jun 09 09:22:23 2015] [error] [client ::1] (20023)The given path was above the root path: Cannot map GET /C:/wamp/www HTTP/1.1 to file
[Tue Jun 09 09:22:24 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/C:/wamp/www
[Tue Jun 09 09:26:26 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/
[Tue Jun 09 09:26:26 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/
[Tue Jun 09 09:26:46 2015] [error] [client ::1] client denied by server configuration: C:/wamp/apps/phpmyadmin3.4.10.1/
[Tue Jun 09 09:26:46 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/phpmyadmin/
[Tue Jun 09 09:30:10 2015] [error] [client ::1] client denied by server configuration: C:/wamp/apps/phpmyadmin3.4.10.1/
[Tue Jun 09 09:30:10 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/phpmyadmin/
[Tue Jun 09 09:31:21 2015] [error] [client ::1] client denied by server configuration: C:/wamp/apps/phpmyadmin3.4.10.1/
[Tue Jun 09 09:31:21 2015] [error] [client ::1] client denied by server configuration: C:/wamp/www/favicon.ico, referer: http://localhost/phpmyadmin/
Your problem is that your browser has decided to use the IPV6 stack rather than the IPV4 stack hence the ip address ::1 in the error messages rather that the more usual `127.0.0.1' IPV4 loopback address.
As IPV6 was very new when the version of WAMPServer that comes with Apache/2.2.21 Apache was released, and is not configured to expect access from the IPV6 loopback address ::1 so you will have to amend the config.
Edit httpd.conf using the wampmanager menus to make sure you edit the correct file. Then look for this section, it will probably look something like this :-
<Directory "c:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
So change these lines as follows
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 ::1 localhost <-- this line
See I have added the ip address ::1 and also localhost
You will also have to change the file that controls access to phpMyAdmin in the same way :-
Edit \wamp\alias\phpmyadmin.conf and change
Order Deny,Allow
Deny from all
Allow from localhost 127.0.0.1
To
Order Deny,Allow
Deny from all
Allow from localhost 127.0.0.1 ::1
You may also need to amend the sqlbuddy and webgrind configs in the same way if you actually use those features.
I assume that you are using windows 8.
Try these:
1. In httpd.conf file, change
Listen 80 line with Listen 127.0.0.1:8080
2. Disable windows firewall. If it works that way, you need to open your port 8080 (adding an exception to windows firewall).
3. If there are any services using port 8080, stop these services, restart wampserver and try again.
4. If none of these works for you, try to change these lines in your wampserver apache configuration file (httpd.conf) and after saving, restart the apache server.
Order Deny, Allow
Deny from all
Allow from 127.0.0.1 :: 1 localhost
Allow from 192.168
Allow from 10.186
First check your localhost is running or not by
http://localhost
if it was not working then it could because of 8080 port conflict assign some other port to apache.Even this could not solve your problem then fastest and easiest way to get rid of this thing is by reinstalling your wampserver download it from here http://www.wampserver.com/en/ a nice installation description provided there.

My Apache localhost is not working - Forbidden

I am completely new to PHP and web servers. I have a test PHP file. When I run this in the terminal I can see that PHP is working "php /Users/Fryza/Sites/phptest.php"
When I type these into the web browser I get 403 Forbidden error:
http://localhost/~fryza/phptest.php
http://localhost/phptest.php
I have a file (/private/etc/apache2/users/fryza.conf) that has these contents:
<Directory "/Users/fryza/Sites/">
Options FollowSymLinks Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
My DocumentRoot in private/etc/apache2/httpd.conf is /Users/Fryza/Sites/
I also have this directory /Library/Webserver/Documents - I used to have this as the document root but it wasn't working in this location either.
I have read through a bunch of stack overflow posts but they are not working for me.
The apache server definitely is running. PHP is working. Just can't get the files to load in the browser.
I'm running Mountain Lion
I did the same tutorial as the guy here and am having the same problem:
403 Forbidden error when accessing localhost on Mac OS X10.8
This is the error log:
[Mon Oct 28 17:57:17 2013] [notice] caught SIGTERM, shutting down
[Mon Oct 28 17:57:17 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Oct 28 17:57:17 2013] [warn] module php5_module is already loaded, skipping
[Mon Oct 28 17:57:17 2013] [notice] Digest: generating secret for digest authentication ...
[Mon Oct 28 17:57:17 2013] [notice] Digest: done
[Mon Oct 28 17:57:17 2013] [notice] Apache/2.2.24 (Unix) DAV/2 PHP/5.3.26 mod_ssl/2.2.24 OpenSSL/0.9.8y configured -- resuming normal operations
Access Log:
::1 - - [28/Oct/2013:18:05:38 -0700] "GET /~fryza/phptest.php HTTP/1.1" 403 220
If you are running skype, your localhost will not run because skype also use the port as localhost. but when you run localhost first before skype it will work.
but when skype run first, you must end task by pressing ctr+alt+del then task manager and select skype then end task..
but that's only for info..
the real deal here is how your localhost work..
try to do this.
click the icon of your wamp server on the right bottom of your computer..
then click Restart All Services..
And run your localhost.
That's all I know.. Im a newbie here.. tnx :)
I finally figured it out. I don't know WHY this worked - but it did.
I changed my fryza.conf file from:
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
To:
<Directory />
#Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
Can someone explain why this worked?

Categories