I just upgrade xampp 5.5.37 for MariaDB but I cannot set up remote access to my htdocs.
in this new version, the httpd-xampp.conf, I can not find these line:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
#Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
Please help!
Here is how I solve my issue:
find httpd.conf make change as follow:
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
<Directory "/Applications/XAMPP/xamppfiles/htdocs">
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
# Require local # comment this out and add
Require all granted
</Directory>
find httpd-xampp.conf if you want to allow phpmyadmin, then change follow:
<Directory "/Applications/XAMPP/xamppfiles/phpmyadmin">
AllowOverride AuthConfig Limit
#Require local
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
If this does not work, meaning that the problem is router or firewall.
As i'm not an expert, I don't know this change will affect the security risk!
Related
i have a problem with phpmyadmin installation via brew, i have modified my root directory to point to /Users/username/Sites in /usr/local/etc/apache2/2.4/httpd.conf.
I have put this in the same file :
Alias /phpmyadmin #{HOMEBREW_PREFIX}/share/phpmyadmin
<Directory #{HOMEBREW_PREFIX}/share/phpmyadmin/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
I use virtual host, so i create a symlink of the folder /usr/shar/phpmyadmin in /Users/username/Sites and create a phpmyadmin.conf like this:
<Directory "/Users/amerej/Sites/phpmyadmin">
Allow From All
AllowOverride All
Options +Indexes
Require all granted
</Directory>
<VirtualHost *:*>
ServerName phpmyadmin.localhost
DocumentRoot "/Users/amerej/Sites/phpmyadmin"
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9071/Users/amerej/Sites/phpmyadmin/$1
</VirtualHost>
I user follow this tutorial for using multiple versions of php :
https://lukearmstrong.github.io/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/
Thank you if can help me i try to solve my problem alone but don't find the solution.
I have an apache server on ubuntu where i have a virtual host that points to my site. Problem is my htaccess not functional.
In my apache2.conf file i have something like
<Directory />
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
if i change AllowOverride for "www" directory htaccess is functional but i get 403 forbidden error. please guide me what i am doing wrong.
regards.
You have to set AllowOverride to all like this.
<Directory "/var/www">
AllowOverride All
</Directory>
After that if you are facing forbidden error then probably you have error in htaccess file. Remove the code in htaccess file then start writing code block by block. By this you can debug error in htaccess file. For more info, you can have a look on this.
https://askubuntu.com/questions/429869/is-this-a-correct-way-to-enable-htaccess-in-apache-2-4-7-on-ubuntu-12-04#answer-429931
When I try to access an phpMyAdmin of xampp in another pc using ip address I get this error:
Access forbidden!
New XAMPP security concept:
Access to the requested object is only available from the local network.
This setting can be configured in the file "httpd-xampp.conf".
I was searching for the solution and found a bunch of suggestions like modifying httpd-xampp.conf file.
1) Option was to modify <LocationMatch> block like this:
<LocationMatch "^/(?i(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Allow from all
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
The problem is that my httpd-xampp.conf file does not contain such a block, but if I try to add it to the end of the file I still get the same error.
2) Option was to modify <Directory "C:/xampp/phpMyAdmin"> as following:
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
Or
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
Or
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig Limit
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
This didn't solve the problem either. Still getting same error.
P.S. I am restarting Apache after each change!
Could someone see what I could be missing?
I just fixed it !
Please go to :
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
and change all the contents as below:
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig Limit
Order allow,deny
Require all granted
Allow from all
</Directory>
If you using Mac,
Go to Xampp Panel > Volumes > Mount, and here you are
then,
open httpd-xampp.conf
change:
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
to:
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
</Directory>
5) Restart Services
Nothing worked for me but following thing was awesome:
1) Open
/opt/lampp/etc/extra/httpd-xampp.conf
2) Find <Directory "/opt/lampp/phpmyadmin">
3) Now just add Require all granted before
4) So the code will look like this
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
</Directory>
5) Now finally Restart XAMPP
I found a solution
just comment this line "Require local"
# since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
#Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
I modified the file etc/apache2/apache2.conf for a WordPress permalink problems, but now I can't access on my localhost.
I changed
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all denied
</Directory>
to
Options Indexes FollowSymLinks
AllowOverride FileInfo
Require all granted
After a2enwrite and reload apache2 my server doesn't work.
I work on Ubuntu 16.04 LTS. Can you help me?
I can currently run either Django through mod_wsgi or PHP on my Apache server.
My Django projects run at: http://localhost and source is at C:/django_proj
My PHP projects run at: http://php.localhost and source is at C:/web
If I turn both on, php.localhost and localhost go to the Django project. I've already set them up through Apache virtual hosts.
Here are some relevant lines in httpd.conf:
DocumentRoot "C:/web"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "C:/web">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory "C:/django_proj">
Order allow,deny
Allow from all
</Directory>
Include "C:/django_proj/apache/apache_django_wsgi.conf"
The relevant lines in apache_django_wsgi.conf is:
WSGIScriptAlias / "C:/django_proj/apache/proj.wsgi"
<Directory "C:/django_proj/apache">
Order allow,deny
Allow from all
</Directory>
Inside httpd-vhosts.conf:
<Directory C:/web>
Order Deny,Allow
Allow from all
</Directory>
<Directory C:/django_proj>
Order Deny,Allow
Allow from all
</Directory>
<VirtualHost *:80>
DocumentRoot "C:/django_proj"
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/web"
ServerName php.localhost
</VirtualHost>
My PHP project is current inaccessible. Does anyone have any ideas what I'm missing?
I run dozens of mod_wsgi/Django sites, PHP sites, and a Rails site with a single Apache.
It's mostly done using virtual hosts but I have some that are running both on the same domain.
You just need to put your WSGIScriptAlias /... after any other Location/Alias directives.
Lets say, for example, I want to run phpMyAdmin on the same domain as a Django site. The config would look something like this:
Alias /phpmyadmin /full/path/to/phpmyadmin/
<Directory /full/path/to/phpmyadmin>
Options -Indexes
...etc...
</Directory>
WSGIScriptAlias / /full/path/to/django/project/app.wsgi
<Directory /full/path/to/django/project>
Options +ExecCGI
...etc...
</Directory>
Edit:
Your configuration should look something like this:
<VirtualHost *:80>
DocumentRoot "C:/django_proj"
ServerName localhost
WSGIScriptAlias / "C:/django_proj/apache/proj.wsgi"
<Directory "C:/django_proj/apache">
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/web"
ServerName php.localhost
Alias / C:/web
<Directory C:/web>
Options Indexes FollowSymLinks
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
You don't need those <Directory> directives in http.conf... do all your configuration in the Virtual hosts.
Also, completely get rid of the <Directory /> block.
Your WSGIScriptAlias / ... directive is telling Apache that everything request starting with "/" should get fed through Django's WSGI handler. If you changed that to read WSGIScriptAlias /django-proj/ ... instead, only requests starting with "/django-proj" would get passed into Django.
An alternative would be to start setting up virtual hosts for each project. This way you could configure Apache to put each project at the / of it's own domain, and you wouldn't need to worry about the configuration for one project affecting one of your other projects.
I had the same problem.
Try removing this block <Directory /> in httpd-conf.
Include httpd-vhost.conf and and try puting my WSGIScriptAlias / "/somewhere/file.wsgi" in virtual host section of httpd-vhosts which listens to port 80.
I would like to add that if you are using Apache ProxyPass, it's possible to deny certain URL patterns so that it falls to mod_php.
ProxyPass /wordpress !
<Location /wordpress>
Require all granted
</Location>