Apache 403 Error WampServer 2 - apache

I have WampServer 2 installed and I have created an alias on my computer called test which points to directory g:/test/.
However I keep getting a 403 error when I try and access localhost/test/
Which is being caused by these lines in my httpd.conf (if I comment these lines out it loads)
<Directory />
AllowOverride none
Require all denied
</Directory>
My conf for test is as follows:
Alias /test/ "g:/test/"
<Directory "g:/test/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>
How do I override the Require all denied in my test.conf file to stop the 403 errors?
Error Log reads:
[Sun Dec 09 18:51:23.757803 2012] [authz_core:error] [pid 5128:tid 884] [client ::1:50622] AH01630: client denied by server configuration: G:/test/
Access Log reads:
::1 - - [09/Dec/2012:18:51:23 +0000] "GET /test/ HTTP/1.1" 403 207

Try to replace deprecated:
Order allow,deny
Allow from all
By:
Require all granted
Concerns only Apache >= 2.4. However, I recommand to disable mod_access_compat (line LoadModule) to avoid Order/Allow/Deny conflicts with Require.

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Allow from all
#Require local
Require all granted
above file comment #Require local
add extra Require all granted
solved

Related

Solve No matching DirectoryIndex without adding index

I want to solve or disable this error:
[Thu Jan 02 23:48:06.382888 2020] [autoindex:error] [pid 17460:tid 140351947863808] [client 92.36.xxx.xxx:49018] AH01276: Cannot serve directory /home/user/public_html/kodi/repository/: No matching DirectoryIndex (index.php,index.html.var,index.htm,index.html,index.shtml,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.phtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html) found, and server-generated directory index forbidden by Options directive
Folder repository doesn't have any index or .htacess file.
I need this folder without index file.
I have apache 2.4 and this config:
<Directory "/home/user/public_html/kodi/">
Require all granted
</Directory>
<Directory "/home/user/public_html/kodi/repository/">
Require all granted
</Directory>
How to solve this error?
I solved this error.
I deleted code above, and enter this:
<Directory "/home/user/public_html/kodi">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Also deleted .htaccess in kodi folder.
And made default.php empty file and now all works great!

apache + symlinks = 403

So I've been reading up a lot on the subject but can't figure out what I'm doing wrong, I also tried a couple solutions found here but still...
I have multilple vhosts set up with Apache, everything working fine serving different files from both /home/usr1/html and /home/usr2/html.
Now I symlinked /home/usr1/html/thisfolder to /home/usr2/html/thatfolder, double checked the FollowSymlinks option is enabled both in apache2.conf and in vhost.conf, but I'm getting a 403 Error.
Why should this be about permits? I mean, www-data can read without any problem from both folders, how is it that when symlinked it just doesn't?
Thanks
EDIT:
Error returned by Apache: (notice the missing script filename, only extension is provided)
[Wed Apr 20 12:13:11.297208 2016] [authz_core:error] [pid 19883] [client 192.168.0.1:12345] AH01630: client denied by server configuration: /home/usr2/html/thatfolder/.php
Virtual Host conf file:
<VirtualHost *:80>
ServerName server.domain.lan
ServerAdmin adm#lan
DocumentRoot /home/usr2/html
<Directory /home/usr2/html>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<Directory /home/usr1/html/thisfolder> // original folder
Require all granted
</Directory>
</VirtualHost>

"client denied by server configuration" after password protection setup in apache2

I created .htaccess and .htpassword for password protection in apache. Then, I modified https.conf.
<Directory "/Library/WebServer/Documents">
Options Indexes FollowSymLinks MultiViews
#AllowOverride None
AllowOverride AuthConfig All
Order allow,deny
Allow from all
</Directory>
After the setting, password protection works fine, but the issue is that the webpage cannot load image file which is in subdirectory of "/Library/WebServer/Documents". Executing tail /var/log/apache2/error_log gives me this error message.
[error] [client 127.0.0.1] client denied by server configuration: /Library/WebServer/Documents/moniwiki/data/cache/gnuplot/wikipagesetupMacBookProTask]-wikipages.png, referer: http://localhost/moniwiki/wiki.php/setupMacBookProTask
When I make AllowOverride AuthConfig None, the error is gone, then there is no password protection.
What's wrong with this? How can I access the subdirectory with password protection?
Following the instruction on this wiki, I added
<Directory "/Library/WebServer/Documents/moniwiki/data/cache/gnuplot">
Order allow,deny
Allow from all
</Directory>
to the https.conf, and it works fine.

Apache Stopps Working after config update

There is a massive problem with my XAMPP apache..... Basically I have set-up virtual hosts, and I tagged the file.
So after I update the httpd.conf file it all the sudden I can not run the apache again......
I saved a copy of the file as httpd.conf.ORG and I played with the other one and I added this:
DocumentRoot "C:/xampp/htdocs"
<VirtualHost 127.0.0.1>
ServerName aam.dev
DocumentRoot"C:\xampp\projects\aam.dev"
</<VirtualHost >
<VirtualHost 127.0.0.1>
ServerName int.tech
DocumentRoot"C:\xampp\projects\int.tech"
</<VirtualHost >
<Directory "C:/xampp/htdocs">
#
# 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.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
<Directory "C:\xampp\projects\aam.dev">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
<Directory "C:\xampp\projects\int.tech">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
I also added the two domains on the windows host file but When I tried to restart the apache it isn't WORKING AT ALL>>>>> it just says
attempting to start Apache service..
And when I go to either the access log or the error log nothing out of interest, final entries are as follow:
Access.log
127.0.0.1 - - [18/Oct/2013:18:28:40 +0100] "GET /xampp/ssi.shtml HTTP/1.0" 200 6 "-" "-"
127.0.0.1 - - [18/Oct/2013:18:28:40 +0100] "GET /xampp/status.php HTTP/1.1" 200 3110 "http://int.tech/xampp/navi.php" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0"
Error.log
[Fri Oct 18 18:29:38.212991 2013] [mpm_winnt:notice] [pid 3864:tid 260] AH00364: Child: All worker threads have exited.
[Fri Oct 18 18:29:38.252994 2013] [mpm_winnt:notice] [pid 6308:tid 384] AH00430: Parent: Child process 3864 exited successfully.
From my Understanding it just stopped normally, that is when I stopped it before making any changing, but after it is not working.... Finally, when I do restart the orginal httpd file it works.
I am assuming something is wrong with my VH Config?
Thanks in advance
BTW I am running XAMP 1.8.3

403 Forbidden on wamp server

I setup my wamp server and can access phpMyAdmin directory on the local host.
I'm trying to access a file from my directory but it gives me error 403 Forbidden yet I've tried to change my httpd.conf to
DocumentRoot "c:/wamp/www/"
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
And I've also changed my phpadmin.conf to
<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
Options Indexes FollowSymLinks ExecCGI
AllowOverride all
Order Deny,Allow
Allow from 127.0.0.1
Allow from MACHINE_IP
And I still can't access some files on my server
Here is the exact message:
Forbidden
You don't have permission to access
/php_sandbox/e-commerce/4-full-mvc-framework/views/login/index.php on
this server.
In your phpadmin.conf these lines are your problem:
Allow from 127.0.0.1
Allow from MACHINE_IP
change this to
Allow from all
and it should work.