I have installed XAMPP in TahrPup. I need this for a class, but being the only one who runs Linux I can't get help from others in class or the instructor.
I'm getting a 403 Forbidden error accessing 127.0.0.1/phpmyadmin/ and localhost/phpmyadmin, or even just trying to access 127.0.0.1 and localhost.
Version: XAMPP for Linux 5.6.3-0
I did check that Apache and MySQL and stuff is started (running xampp start).
I have tried based on other answers editing httpd-xampp.conf under <LocationMatch ... to say
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8
Allow from all
And in httpd.conf it says
<Directory "/opt/lampp/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
... this was already the configuration, and most answers said to change it -to- this, which it already was.
I can post config files if needed. I'm just to the point of not knowing where to start anymore.
As stated here:
Why can't I access Xampp's phpmyadmin on localhost? Access is forbidden.
The lines
Order allow,deny
Allow from all
needed to be removed. Okay.
Related
I'm working on a project in a group. I'm the only guy using Linux. Anyways, we use git and there's one file which causes me problems.
The htaccess contains the following:
<IfModule authz_core_module>
Require all granted
</IfModule>
If I comment out the Require all granted, it works, however, when it's not commented out, it gives me a 500 server error.
I do have authz_core_module and I can't disable it because if it's not a module it will Deny from all.
Why is that line giving me a 500 server error? The file works correctly at all those other guys who use Windows. Is it something because of my Linux apache?
I got it to work by adding these 2 lines to my httpd.conf file:
<Directory /THEPATHHERE/>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo Indexes Authconfig
</Directory>
I have recently been tasked with hosting a git server on Linux. I am very new to the Linux world so it was struggle just to get where I am today. I am at the point where I have created a bare repository and can view it using GitWeb (hosted on Apache).
Since I can browse to it with GitWeb I figured my configuration of the apache server and git were correct, but I still cant clone the repository on a remote machine. Depending on how I have apache configured, I either get a 403 Forbidden error or a 404 error when attempting to clone.
I am not sure if my git repository isn't configured correctly, my apache configuration is bad, or the folder security makes it inaccessible. It could be multiple things.
I have since removed GitWeb so that I could work with the simplest git and apache configurations possible. I am sure there are plenty of different reasons for my issues, so I am more asking for a few common misconfigurations that might be the culprit.
Here are some portions of my apache configuration. My repository is located at /opt/git
<VirtualHost *:80>
ServerName gitserver
DocumentRoot /opt/git
<Directory /opt/git>
Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride All
order allow,deny
Allow from all
</Directory>
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
</VirtualHost>
<Directory "/opt/git">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
As I said, I was able to (with a different configuration) browse to my GitWeb page, so apache is definitely running and at some point the VirtualHost was configured correctly, but something is definitely wrong.
Thanks!
Looks like it wasn't an issue with apache, it is an issue with git. I needed to run the command
git update-server-info
I was confused because This Documentation made it seem like the command would run automatically, since I just copied the sample hooks. I guess you have to run the command whenever you create a new repository?
I'm coming from a non-cloud hosting background on Red Hat Enterprise Linux and/or CentOS and trying to set up an apache (2.2) server with Amazon EC2. I typically host my files from a user's home directory and create a virtualhost like so:
<VirtualHost *:80>
ServerName userdomain.com
DocumentRoot /home/myuser/public_html
<Directory /home/myuser/public_html>
AllowOverride All
<Limit DELETE>
Order Deny,Allow
Deny from All
</Limit>
</Directory>
</VirtualHost>
However on Amazon EC2 that doesn't seem to work at all no matter how I sent the file permissions.
Is this something that just isn't allowed? Do I have to host files from /var/www? What am I missing?
It turns out Linux had SELinux enabled, which I have not encountered before.
The simplest solution was to put it in "permissive" mode as described at
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Enabling_and_Disabling_SELinux-Disabling_SELinux.html
I'm desperately trying to get phpmyadmin access on xampp for linux 1.8.0 for ubuntu 12.04 LTS. I know this is a common problem, but I have tried many threads across the web, and I am still stuck getting it going.
Xampp seems to be running ok, localhost start page good, including link to phpmyadmin in the sidebar. When I follow that link I get a 403 error:
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
localhost Apache/2.4.2 (Unix) OpenSSL/1.0.1c PHP/5.4.4
I have tried numerous things, including amending httpd-xampp.conf, the relevant bits of which now look like: http://pastebin.com/J4f4tNVs
my /opt/lampp/phpmyadmin/config.inc.php looks like: http://pastebin.com/5PZPXK5s
Following other instructions I changed ownership of /lampp with:
chown -Rv nobody:root ./lampp/*
Please help me!
Thanks,
Matt
I've found a solution here: http://www.apachefriends.org/f/viewtopic.php?f=17&t=50902&p=196185#p196185
Edit /opt/lampp/etc/extra/httpd-xampp.conf and adding Require all granted line at bottom of block <Directory "/opt/lampp/phpmyadmin"> to have the following code:
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
</Directory>
I have copied one of my old applications and renamed it to New_application. I want to access .htaccess file that is inside the New_application folder. When I opened it with my text editor, it just showed Deny from all. I tried to open .htaccess in my old application, it showed Deny from all too. I remember I was able to edit it before but not sure what I can't now. Any thoughts? Thanks a lot.
Deny from all
is an .htaccess command (the actual content of that file you are trying to view). Not a denial of being able to edit the file. Just reopen the .htaccess file in the text viewer of choice and make the alterations as you so desire, save it, then reupload it to your folder of choice.
Though I think inadvertently you are blocking even yourself from viewing said application once uploaded.
I would do something like:
order deny,allow
deny from all
allow from 127.0.0.1
which will deny everyone but the IP in the allow from line, which you would change the IP to match your IP which you can obtain from http://www.whatismyip.com/ or similar site.
This syntax has changed with the newer Apache HTTPd server, please see upgrade to apache 2.4 doc for full details.
2.2 configuration syntax was
Order deny,allow
Deny from all
2.4 configuration now is
Require all denied
Thus, this 2.2 syntax
order deny,allow
deny from all
allow from 127.0.0.1
Would ne now written
Require local
You can edit it. The content of the file is literally "Deny from all" which is an Apache directive: http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny
A little alternative to #gaspĀ“s answer is to simply put the actual domain name you are running it from. Docs: https://httpd.apache.org/docs/2.4/upgrading.html
In the following example, there is no authentication and all hosts in
the example.org domain are allowed access; all other hosts are denied
access.
Apache 2.2 configuration:
Order Deny,Allow
Deny from all
Allow from example.org
Apache 2.4 configuration:
Require host example.org