Forbidden

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Forbidden

Postby reaply » 13. December 2011 02:42

Code: Select all
Access forbidden!

New XAMPP security concept:

Access to the requested directory is only available from the local network.

This setting can be configured in the file "httpd-xampp.conf".

If you think this is a server error, please contact the webmaster.

Error 403

24.6.106.161
12/12/11 17:34:26
Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1



I get this error everytime, how do I fix this?
reaply
 
Posts: 11
Joined: 13. December 2011 02:40
Operating System: Windows 7

Re: Forbidden

Postby Sharley » 13. December 2011 02:44

I get this error everytime, how do I fix this?
What are you doing everytime to get this error?

What are you typing in your browser's address bar?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Forbidden

Postby reaply » 13. December 2011 02:46

Thanks for the reply, (I saw that I got a new post and the picture was red and I thought it 'ment that it was locked I got scared :P)

I just installed it. And I am using my ip address to access it.
reaply
 
Posts: 11
Joined: 13. December 2011 02:40
Operating System: Windows 7

Re: Forbidden

Postby Sharley » 13. December 2011 02:48

Sharley wrote:What are you typing in your browser's address bar?


New users can find self help by reading these first:
readme_en.txt file in the xampp folder.
http://www.apachefriends.org/en/xampp-windows.html
http://www.apachefriends.org/en/faq-xampp-windows.html

Some useful reading that may help you help us to find suitable solutions:
viewtopic.php?f=16&t=48331
viewtopic.php?f=16&t=32670
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Forbidden

Postby reaply » 13. December 2011 02:53

I have searched before making this thread. And I have tried different topics for an error and cannot succeed. Those FAQ do not help at all.

UPDATE: Also, now mysql doesn't open anymore.
reaply
 
Posts: 11
Joined: 13. December 2011 02:40
Operating System: Windows 7

Re: Forbidden

Postby Sharley » 13. December 2011 02:58

You still have not answered my question.

Which IP are you typing in the browser?

Have you tried http://localhost and if so does the Welcome page appear?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Forbidden

Postby reaply » 13. December 2011 03:00

I thought you wanted in general, not a specific ip.

24.6.106.161 is the ip.

I did try localhost, and just the error.

Thanks for replying again.


Incase you need to see the file's setting:

Code: Select all
#
# XAMPP settings
#

<IfModule env_module>
    SetEnv MIBDIRS "C:/xampp/php/extras/mibs"
    SetEnv MYSQL_HOME "\\xampp\\mysql\\bin"
    SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf"
    SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\php"
    SetEnv PHPRC "\\xampp\\php"
    SetEnv TMP "\\xampp\\tmp"
</IfModule>

#
# PHP-Module setup
#
LoadFile "C:/xampp/php/php5ts.dll"
LoadModule php5_module "C:/xampp/php/php5apache2_2.dll"

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>

#
# PHP-CGI setup
#
#<FilesMatch "\.php$">
#    SetHandler application/x-httpd-php-cgi
#</FilesMatch>
#<IfModule actions_module>
#    Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"
#</IfModule>


<IfModule php5_module>
    PHPINIDir "C:/xampp/php"
</IfModule>

<IfModule mime_module>
    AddType text/html .php .phps
</IfModule>

ScriptAlias /php-cgi/ "C:/xampp/php/"
<Directory "C:/xampp/php">
    Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
    <Files "php-cgi.exe">
        Allow from all
    </Files>
</Directory>

<Directory "C:/xampp/cgi-bin">
    <FilesMatch "\.php$">
        SetHandler cgi-script
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler None
    </FilesMatch>
</Directory>

<Directory "C:/xampp/htdocs/xampp">
    <IfModule php5_module>
       <Files "status.php">
          php_admin_flag safe_mode off
       </Files>
    </IfModule>
    AllowOverride AuthConfig
</Directory>

<IfModule alias_module>
    Alias /security "C:/xampp/security/htdocs/"
    <Directory "C:/xampp/security/htdocs">
        <IfModule php5_module>
          <Files "xamppsecurity.php">
             php_admin_flag safe_mode off
          </Files>
        </IfModule>
        AllowOverride AuthConfig
   </Directory>

    Alias /licenses "C:/xampp/licenses/"
    <Directory "C:/xampp/licenses">
        Options +Indexes
        <IfModule autoindex_color_module>
            DirectoryIndexTextColor  "#000000"
            DirectoryIndexBGColor "#f8e8a0"
            DirectoryIndexLinkColor "#bb3902"
            DirectoryIndexVLinkColor "#bb3902"
            DirectoryIndexALinkColor "#bb3902"
        </IfModule>
   </Directory>

    Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
    <Directory "C:/xampp/phpMyAdmin">
        AllowOverride AuthConfig
    </Directory>

    Alias /webalizer "C:/xampp/webalizer/"
    <Directory "C:/xampp/webalizer">
        <IfModule php5_module>
          <Files "webalizer.php">
             php_admin_flag safe_mode off
          </Files>
        </IfModule>
        AllowOverride AuthConfig
    </Directory>
</IfModule>


#
# New XAMPP security concept
#

# Close XAMPP security section here
<LocationMatch "^/(?i:(?:security))">
    Order deny,allow
    Deny from all
    Allow from ::127.0.0.1
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

# Close XAMPP sites here
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    Deny from all
    Allow from ::127.0.0.1
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>
reaply
 
Posts: 11
Joined: 13. December 2011 02:40
Operating System: Windows 7

Re: Forbidden

Postby Sharley » 13. December 2011 03:09

You can't access XAMPP using your WAN IP unless you either use a proxy or you configure your router for loopback if it supports it as this old but still relevant topic mentions.
viewtopic.php?f=16&t=9929
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Forbidden

Postby Sharley » 13. December 2011 03:11

That section in the httpd-xampp.conf file at the end only blocks access to the folders mentioned in the LocationMatch lines and not files and folders in the htdocs folder or the files and folders you have added to the htdocs folder
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Forbidden

Postby reaply » 13. December 2011 03:14

I just tried with a proxy and my phnoe, no dice.
reaply
 
Posts: 11
Joined: 13. December 2011 02:40
Operating System: Windows 7

Re: Forbidden

Postby Sharley » 13. December 2011 03:20

Is port 80 blocked by your ISP?

Is your firewall blocking?

I thought you wanted in general, not a specific ip
If you read the announcement about how to post then you would see the section that outlines that we can't see your screen so you need to post ALL the details required for troubleshooting.

What does the \xampp\apache\logs\error.log file tell you or even the access.log file?.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Forbidden

Postby Sharley » 13. December 2011 03:25

OK, I have just tried to access from here using your IP and your issue is with the index.php in the htdocs folder that is not allowing access via proxy or phone..

http://24.6.106.161/
The index.php is redirecting to the xampp folder which is one of those protected folders in the httpd-xampp.conf file.
http://24.6.106.161/xampp/

Delete or rename index.php and you should be able to access using your proxy.

http://24.6.106.161/index.html
Will give you It Works!

Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Forbidden

Postby Sharley » 13. December 2011 05:08

Only one issue per topic as per the forum how to post announcement.

Thanks for the help, I appreciate it a lot! That .php file was the problem :D. Thanks for the fast replys and you deserve your moderator status :).
Sorry I was gone, I had to run to the store. Which is why I did not respond.
This topic has been solved and will be closed.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 101 guests