phpPgAdmin access denied for remote access on ubuntu 14.04 - apache

I've looked at quite a few answers for this, but all seem apparently out of date. I'm using Ubuntu 14.04 and Apache 2.4.7. My /etc/apache2/conf.d/phppgadmin file looks like this:
Alias /phppgadmin /usr/share/phppgadmin
<Directory /usr/share/phppgadmin>
DirectoryIndex index.php
AllowOverride all
order deny,allow
#deny from all
#allow from 127.0.0.0/255.0.0.0 ::1/128
Require all granted
<IfModule mod_php5.c>
php_flag magic_quotes_gpc Off
php_flag track_vars On
#php_value include_path .
</IfModule>
<IfModule !mod_php5.c>
<IfModule mod_actions.c>
<IfModule mod_cgi.c>
AddType application/x-httpd-php .php
Action application/x-httpd-php /cgi-bin/php
</IfModule>
<IfModule mod_cgid.c>
AddType application/x-httpd-php .php
Action application/x-httpd-php /cgi-bin/php
</IfModule>
</IfModule>
</IfModule>
</Directory>
Also have a file 000-default in /etc/apache2/sites-enabled while looks like:
<Directory "/usr/share/phpPgAdmin">
AuthUserFile /etc/phpPgAdmin/.htpasswd
AuthName "Restricted Area"
AuthType Basic
require valid-user
</Directory>
And I've modified /etc/phppgadmin/.htpasswd appropriately.
Nonetheless, when I try to log into it remotely I get a 403: Forbidden error.
Any ideas? Further, could this error be imposed by the type of network I'm on? (it's a campus network).

Try is
sudo cp /etc/apache2/conf.d/phppgadmin /etc/apache2/conf-enabled/phppgadmin.conf
Restart httpd2 (Apache)
sudo /etc/init.d/apache2 restart
or
sudo service apache2 start
For Ubuntu 14.04

Related

How to create an alias for phpmyadmin in apache?

Using Ubuntu 16.04, apache2.
I have the following virtual host in apache, but my URL http://example.com/phpmyadmin gives a 404 error. Any ideas?
From looking at other stackoverflow posts, this should work, but it isn't working. I'm fairly new to the Linux/Apache world (if this was on IIS I'd be fine!) so if you can give any pointers that'd also be appreciated.
<VirtualHost *:80>
ServerName example.org
Alias /phpmyadmin/ /user/share/phpmyadmin/
DocumentRoot "/var/www/html"
<Directory /usr/share/phpmyadmin>
Require all granted
Options FollowSymLinks
DirectoryIndex index.php
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_flag allow_url_fopen Off
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
</IfModule>
</Directory>
# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All
</Directory>
<Directory "/var/www/html">
allow from all
Options None
Require all granted
</Directory>
</VirtualHost>
Thanks in advance.

Installing/configurate Symfony3.2 on a Vhost Ubuntu subdomain folder --> Error 403 Forbidden and Error 500

I try to install Symfony3.2 on my vhost, running Plesk under ubuntu.
My goal is to create a production-server-status to test my Symfony-projects online.
I want to get to this project using the URL subexample.example.tld or subexample.example.tld/matchGen.
On my journey through the cavern of tears and everlasting self-doubt, I saw a lot of different errors and even achieved to break the whole vhost down including my email system... great job.
Well.. now I got the error 403 Forbidden.
The good news (at least for me): I see the favicon of symfony and if I try to open the app_dev.php (subexample.example.tld/matchGen/web/app_dev.php) it will say You are not allowed to access this file. Check app_dev.php for more information..
Opening the app.php with subexample.example.tld/matchGen/web/app.phpresult in a redirect to subexample.example.tld/matchGen/web/ and The server returned a "500 Internal Server Error"..
subexample.example.tld runs into Forbidden, too.
I already tried/did the following:
New Install at a different location
PHP matchGen/bin/symfony_requirements --> [OK] Your system is ready to run Symfony projects
Using this as Guide http://symfony.com/doc/current/setup/web_server_configuration.html#web-server-apache-mod-php (Apache 2.4 - FastCGI)--> created my subexample.example.tld.conf in /etc/apache2/sites-available, used a2ensite subexample.example.tld.conf and service apache2 reload --> * Reloading web server apache2, apparently no problems.
I tried to use a different directory for the web folder and all the other stuff --> changed nothing
Changing the rights with chmod and chown --> well... now I know how to apply a backup... long story short --> I was way too naive and learned a valuable lesson with Ubuntu and the change of rights.
https://www.liquidweb.com/kb/apache-error-no-matching-directoryindex-index-html-found-solved/ --> No effect.
Now for the error.logs:
/var/www/vhosts/system/subexample.example.tld/logs/error_logs
[Mon Apr 10 20:41:45.361150 2017] [autoindex:error] [pid 15012] [client 87.147.219.10:5188] AH01276: Cannot serve directory /var/www/vhosts/example.tld/subexample.example.tld/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Mon Apr 10 20:41:47.707623 2017] [autoindex:error] [pid 15012] [client 87.147.219.10:5188] AH01276: Cannot serve directory /var/www/vhosts/example.tld/subexample.example.tld/matchGen/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
/var/log/apache2/matchGen_error.log and /var/log/apache2/matchGen_access.log are empty.
My configfiles:
/etc/apache2/sites-available/subexample.example.tld.conf
<VirtualHost *:80>
ServerName subexample.example.tld
ServerAlias www.subexample.example.tld
DocumentRoot /var/www/vhosts/example.tld/subexample.example.tld/matchGen/web
<Directory /var/www/vhosts/example.tld/subexample.example.tld/matchGen/web>
AllowOverride None
Require all granted
Allow from All
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
</Directory>
# uncomment the following lines if you install assets as symlinks
# or run into problems when compiling LESS/Sass/CoffeeScript assets
# <Directory /var/www/project>
# Options FollowSymlinks
# </Directory>
# optionally disable the RewriteEngine for the asset directories
# which will allow apache to simply reply with a 404 when files are
# not found instead of passing the request into the full symfony stack
<Directory /var/www/vhosts/example.tld/subexample.example.tld/matchGen/web/bundles>
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
</Directory>
ErrorLog /var/log/apache2/matchGen_error.log
CustomLog /var/log/apache2/matchGen_access.log combined
</VirtualHost>
/var/www/vhosts/system/subexample.example.tld/conf/httpd.conf
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
#IF YOU REQUIRE TO APPLY CUSTOM MODIFICATIONS, PERFORM THEM IN THE FOLLOWING FILES:
#/var/www/vhosts/system/subexample.example.tld/conf/vhost.conf
#/var/www/vhosts/system/subexample.example.tld/conf/vhost_ssl.conf
<IfModule mod_ssl.c>
<VirtualHost xx.xx.xxx.xxx:443 >
ServerName "subexample.example.tld:443"
ServerAlias "www.subexample.example.tld"
ServerAlias "ipv4.subexample.example.tld"
ServerAdmin "root#example.tld"
UseCanonicalName Off
DocumentRoot "/var/www/vhosts/example.tld/subexample.example.tld"
CustomLog /var/www/vhosts/system/subexample.example.tld/logs/access_ssl_log plesklog
ErrorLog "/var/www/vhosts/system/subexample.example.tld/logs/error_log"
<IfModule mod_suexec.c>
SuexecUserGroup "xxxx" "xxxx"
</IfModule>
<IfModule mod_userdir.c>
UserDir "/var/www/vhosts/example.tld/web_users"
</IfModule>
<IfModule mod_sysenv.c>
SetSysEnv PP_VHOST_ID "6a66d04f-d22f-4a30-bb80-ca47f117886a"
</IfModule>
ScriptAlias "/cgi-bin/" "/var/www/vhosts/example.tld/subexample.example.tld/cgi-bin/"
Alias "/plesk-stat" "/var/www/vhosts/system/subexample.example.tld/statistics"
<Location /plesk-stat/>
Options +Indexes
</Location>
<Location /plesk-stat/logs/>
Require valid-user
</Location>
Alias /webstat /var/www/vhosts/system/subexample.example.tld/statistics/webstat
Alias /webstat-ssl /var/www/vhosts/system/subexample.example.tld/statistics/webstat-ssl
Alias /ftpstat /var/www/vhosts/system/subexample.example.tld/statistics/ftpstat
Alias /anon_ftpstat /var/www/vhosts/system/subexample.example.tld/statistics/anon_ftpstat
Alias /awstats-icon /usr/share/awstats/icon
SSLEngine on
SSLVerifyClient none
SSLCertificateFile /opt/psa/var/certificates/certyKQzXqX
SetEnv PP_CUSTOM_PHP_INI /var/www/vhosts/system/subexample.example.tld/etc/php.ini
SetEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
<IfModule mod_fcgid.c>
FcgidInitialEnv PP_CUSTOM_PHP_INI /var/www/vhosts/system/subexample.example.tld/etc/php.ini
FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
FcgidMaxRequestLen 134217728
FcgidIOTimeout 600
</IfModule>
TimeOut 600
<Directory /var/www/vhosts/example.tld/subexample.example.tld>
<IfModule mod_fcgid.c>
<Files ~ (\.fcgi$)>
SetHandler fcgid-script
Options +ExecCGI
</Files>
</IfModule>
<IfModule mod_fcgid.c>
<Files ~ (\.php$)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
Options +ExecCGI
</Files>
</IfModule>
SSLRequireSSL
Options -Includes +ExecCGI
</Directory>
<Directory /var/www/vhosts/example.tld/web_users>
<IfModule mod_php4.c>
php_admin_flag engine off
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine off
</IfModule>
</Directory>
<Directory /var/www/vhosts/subexample.example.tld>
Options +FollowSymLinks
</Directory>
<Directory "/var/www/vhosts/system/subexample.example.tld/statistics">
AuthType Basic
AuthName "Domainstatistiken"
AuthUserFile "/var/www/vhosts/system/subexample.example.tld/pd/d..httpdocs#plesk-stat"
require valid-user
</Directory>
<IfModule mod_security2.c>
</IfModule>
</VirtualHost>
</IfModule>
<VirtualHost xx.xx.xxx.xxx:80 >
ServerName "subexample.example.tld:80"
ServerAlias "www.subexample.example.tld"
ServerAlias "ipv4.subexample.example.tld"
ServerAdmin "root#example.tld"
UseCanonicalName Off
DocumentRoot "/var/www/vhosts/example.tld/subexample.example.tld"
CustomLog /var/www/vhosts/system/subexample.example.tld/logs/access_log plesklog
ErrorLog "/var/www/vhosts/system/subexample.example.tld/logs/error_log"
<IfModule mod_suexec.c>
SuexecUserGroup "xxxx" "xxxx"
</IfModule>
<IfModule mod_userdir.c>
UserDir "/var/www/vhosts/example.tld/web_users"
</IfModule>
<IfModule mod_sysenv.c>
SetSysEnv PP_VHOST_ID "6a66d04f-d22f-4a30-bb80-ca47f117886a"
</IfModule>
ScriptAlias "/cgi-bin/" "/var/www/vhosts/example.tld/subexample.example.tld/cgi-bin/"
Redirect permanent /plesk-stat https://subexample.example.tld/plesk-stat
Redirect permanent /webstat https://subexample.example.tld/webstat
Redirect permanent /webstat-ssl https://subexample.example.tld/webstat-ssl
Redirect permanent /ftpstat https://subexample.example.tld/ftpstat
Redirect permanent /anon_ftpstat https://subexample.example.tld/anon_ftpstat
Redirect permanent /awstats-icon https://subexample.example.tld/awstats-icon
<IfModule mod_ssl.c>
SSLEngine off
</IfModule>
SetEnv PP_CUSTOM_PHP_INI /var/www/vhosts/system/subexample.example.tld/etc/php.ini
SetEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
<IfModule mod_fcgid.c>
FcgidInitialEnv PP_CUSTOM_PHP_INI /var/www/vhosts/system/subexample.example.tld/etc/php.ini
FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX fastcgi
FcgidMaxRequestLen 134217728
FcgidIOTimeout 600
</IfModule>
TimeOut 600
<Directory /var/www/vhosts/example.tld/subexample.example.tld>
<IfModule mod_fcgid.c>
<Files ~ (\.fcgi$)>
SetHandler fcgid-script
Options +ExecCGI
</Files>
</IfModule>
<IfModule mod_fcgid.c>
<Files ~ (\.php$)>
SetHandler fcgid-script
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
Options +ExecCGI
</Files>
</IfModule>
Options -Includes +ExecCGI
</Directory>
<Directory /var/www/vhosts/example.tld/web_users>
<IfModule mod_php4.c>
php_admin_flag engine off
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine off
</IfModule>
</Directory>
<Directory /var/www/vhosts/subexample.example.tld>
Options +FollowSymLinks
</Directory>
<Directory "/var/www/vhosts/system/subexample.example.tld/statistics">
AuthType Basic
AuthName "Domainstatistiken"
AuthUserFile "/var/www/vhosts/system/subexample.example.tld/pd/d..httpdocs#plesk-stat"
require valid-user
</Directory>
<IfModule mod_security2.c>
</IfModule>
</VirtualHost>
Well, I think that should give you the idea of my problem.
Thank you in advance!
Ah... please explain it for dummies... I know some things... but apparently not enough.
Edit 1:
I tried again to change the rights...
This time I created a new group, put my matchGen folder in it and tried to allow everything in this group.
sudo addgroup Symfony --force-badname
Allowing use of questionable username.
Adding group `Symfony' (GID 1009) ...
Done.
sudo chown root.Symfony /var/www/vhosts/example.tld/subexample.example.tld/matchGen -R
chmod g+rwx /var/www/vhosts/example.tld/subexample.example.tld/matchGen
No change.
Oh.. and I added the user www-data to the group Symfony.
Edit 2:
I tried to work with http://symfony.com/doc/current/setup/web_server_configuration.html#web-server-apache-fpm, but nothing changed.
After the reset I tried to open subexample.example.tld/matchGen/web/ again.
Well it did not work, but this time the error seemed to be different HTTP ERROR 500.
So... after looking in the Looks again --> mod_fcgid: stderr: PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/var/www/vhosts/example.tld/subexample.example.tld/matchGen/var/logs/prod.log" could not be opened: failed to open stream: Permission denied' in /var/www/vhosts/example.tld/subexample.example.tld/matchGen/var/cache/prod/classes.php:8203
It is definitely a problem with the rights. But why will it not work?
...
I tried to setup the www-data-user with acl, using this guide --> http://symfony.com/doc/current/setup/file_permissions.html#using-acl-on-a-system-that-supports-setfacl-linux-bsd
Instead of using var or /var at the end of the setfacl-command I used matchGen as a folder.
No change.
Edit 3:
I did it!
This here helped me after i reached the point after Edit 2.
'Failed to open stream: Permission denied' error - Laravel
Go in your project folder and use php bin/console cache:clear --env=prod
Follow up with chmod -R 777 var
Finish with composer dump-autoload
Finally...
Here is a list of things you should check if you got the same problem:
run php bin/symfony_requirements in your project folder. You may need to set up the timezone in your php.ini
create and activate a config/site for your subdomain in /etc/apache2/site-available and use a2ensite subexample.example.tld.conf. Be sure to end the name with .conf when creating the file.
Before you create/change the rights use php bin/console cache:clear --env=prod in your project folder, then set them for your var folder with chmod -R 777 var. Finish it in your project folder with composer dump-autoload.

XAMPP: Connecting to localhost fix? [Persistent]

I just installed XAMPP Windows 1.8.2 in my computer. Port 80 is secured and in use by Apache there are no problems nor any port conflicts. I always open Xampp and start both Apache and MySQL Modules in the control panel. Both modules are running, Whenever I click on the Apache admin button it redirects me to the localhost page, It takes a while to load and then this error shows up.
If it's too small for you guys the error says: Network Error (tcp_error)
A communication error occurred: "Connection refused"
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
For assistance, contact your network support team.
Another error shows up if i try with 127.0.0.1:
The localhost changes to 130.147.134.66 NOTE: I use a proxy network and the IP address is 130.147.134.251.
I have tried changing and updating the hosts file in the C:\Windows\System32\Drivers\Etc\hosts. but the problem still persists.
Keep that in mind I am new to using Xampp, and its been only a week since I started using phpMyAdmin and MySQL
My httpd-xampp.conf file:
#
# 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_4.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">
AllowOverride None
Options None
Require all denied
<Files "php-cgi.exe">
Require all granted
</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>
Order deny,allow
Deny from all
Allow from localhost
</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>
Require all granted
</Directory>
Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
Order allow,deny
Allow from all
Require all granted
</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
Require all granted
</Directory>
</IfModule>
#
# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
It's already giving you the answer.
Look at your second picture.
This setting can be configured in the file "httpd-xampp.conf"
How to "fix" this:
either: disable your proxy for local addresses
or:
1) open the file "\xampp\apache\conf\extra\httpd-xampp.conf" in a texteditor
2) replace "Allow from localhost" with "Allow from YOURLOCALIP" (2 times)
3) save the file
4) restart Apache
See http://www.apachefriends.org/f/viewtopic.php?t=32503#p131519 too
Edit:
It's in line 120-128:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16 \
YOURLOCALIP <--------------------------------------------------------------
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Your security configuration for XAMPP is specified in the LocationMatch as chill0r mentioned, on lines 120-128.
Your configuration is allowing from ::1 127.0.0.0/8 \, fc00::/7 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and fe80::/10 169.254.0.0/16 which will never be matched since you're using a proxy AND it's denying everything. This is where the Order statement comes in. It tells your configuration to match against deny first then allow, so it will always deny since you have Deny all.
You need to change your configuration so that it doesn't deny everything and allows at least your own IP. Since it sounds like your running a local dev environment and not exposing it, you can consider removing all restrictions:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Allow from all
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
If you do this, configure your firewall prevent port 80 access from outside your network (this can be done on your machine or router). Alternatively, you can configure it to work for an IP range using a partial IP that includes your proxy:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order allow,deny
Deny from all
Allow from 130.147.134
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Notice that the Order changed from deny,allow to allow,deny so it will check against the allow statement first.
I also noticed that the two requests were for different paths, the first one is "/" and the second is "/xampp/" and the latter is the one that wasn't refused.
In your IfModule alias_module you should add an alias:
Alias "/" "C:/xampp/htdocs/xampp"
This will help you get off the ground, but you'll need to make sure to learn about the directives, specifically Alias and AliasMatch as your routing gets more complicated. Alternatively, you could just develop in the C:/xampp/htdocs/ directory instead of C:/xampp/htdocs/xampp.
Before starting the XAMPP server make sure that other running services are closed like Skype and other servers which is using the same port number.
I had the same problem, the solution is easier than other answers.
1) Install XAMPP in your pc, in this case, Windows 8.
2) Start > Administrative Tools > Services > Web Deployment Agent service and press STOP.
Usually Web Deployment uses port 80 which is the port used by XAMPP by default. If you stop that process and write localhost in your web browser you should be able to access phpmyadmin.
Hope it helps :)
Follow the below Steps
In XAMPP on the Apache Module ,Select Config button httpd.conf
Comment "Deny from all" in the following section,
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
#Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Restart the XAMPP (Important Step)

mod_rewrite ignores existing files

There is a number of similar questions, but none of them help.
I have the following rule in my .htaccess
RewriteRule ^images/.*$ - [F]
so for folders like /images/goods/ or /images/nonexistentfile.jpg I get 'Forbidden' which is what I want. The problem is if an existent file is requested, my rules are ignored and the file is served. In fact if I make a deliberate mistake in .htaccess I don't get an Internal Server Error as I would when requesting folders or non-existent files. What should I look for?
apache2.conf
<VirtualHost 1.2.3.4:8080>
ServerName domain.com
DocumentRoot /var/www/s3/data/www/domain.com
SuexecUserGroup s3 s3
CustomLog /var/www/httpd-logs/domain.com.access.log combin$
ErrorLog /var/www/httpd-logs/domain.com.error.log
ServerAlias www.domain.com
ServerAdmin example#domain.com
AddDefaultCharset utf-8
php_admin_value open_basedir "/var/www/s3/data:.:/tmp"
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f example#domain.com
php_admin_value upload_tmp_dir "/var/www/s3/data/mod-tmp"
php_admin_value session.save_path "/var/www/s3/data/mod-tmp"
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
AddType application/x-httpd-php-source .phps
</VirtualHost>
anything else I should post here?
I had a similar issue.
I put the following .htaccess in to the images folder to forbid access to jpg files (in my case)
IndexIgnore */*
<Files ~ ".*\.jpg$">
Order deny,allow
Deny from all
</Files>
It looks like you're htaccess file isn't being applied. Try adding an AllowOverride directive in your vhost config:
<Directory "/var/www/s3/data/www/domain.com/">
AllowOverride All
</Directory>
By default, AllowOverride should be set to All, but it's possible your host set it to something else at the server config level.
in case someone has the same problem, it is painfully trivial. The default ISPManager installation puts nginx in front of Apache for static files...

phpmyadmin - list files in directory

I have apache+mysql+phpmyadmnin under Gentoo.
phpmyadmin-3.2.2
It worked fine before, but now, when I'm loading http://localhost/phpmyadmin I get a list of flies in phpmyadmin-directory, and when I chose index.php, I get it's own code.
What I did wrong?
It means that apache does not recognizes neither of your files as php executables. Maybe you run an 'emerge update world' and then an 'env-update' which install a new apache2 version and then re-write the old apache config file. As LiraNuna mentioned, you need to check that the phpMyAdmin directory contains the proper instruction to load the proper PHP module. In this way apache will know how to handle the php files.
This is what I have on /etc/apache2/vhosts.d/default_vhost.include under the phpMyAdmin Directory definition:
Alias /phpMyAdmin /var/www/localhost/htdocs/phpMyAdmin
<Directory /var/www/localhost/htdocs/phpMyAdmin>
Options Indexes FollowSymLinks
DirectoryIndex index.php
# Authorize for setup
<Files setup.php>
# For Apache 1.3 and 2.0
<IfModule mod_auth.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
# For Apache 2.2
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</Files>
<IfModule mod_php4.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
&lt/IfModule>
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>
</Directory>
This should solve your problem.
Is mod_php5 installed? If so, do you have the php handler set up to handle .php files?
<IfModule mod_php5.c>
AddType application/x-httpd-php .php .phtml .php4 .php3
AddType application/x-httpd-php-source .phps
</IfModule>
If you are not using mod_php5, do you use any form of CGI? Do the .php files have execute permissions?