gitorious gives permission denied on fresh bitnami setup , amazon ec2 instance using https - ssl

This is a brand new installation of a bitnami gitorius image on EC2, worked fine until i tried to enable https/ssl.
I am sure i have misconfigured apache somehow, however the root document at https://tarantula.anatexis.net loads just fine.
but if one goes to the gitorious app at https://tarantula.anatexis.net/gitorious you get permission denied.
which config file do I edit to allow https traffic to gitorious.
looking at the apache logs, is see this,
[Mon Jun 03 17:25:20 2013] [error] [client 71.17.13.29] Directory index forbidden by Options directive: /opt/bitnami/apache2/htdocs/gitorious/, referer:Https://tarantula.anatexis.net/
Any help would be appreciated, Thanks
Joe

OK, so i fixed it, found the file /opt/bitnami/apache2/conf/extra/httpd-ssl.conf this config file has the document root in it for ssl traffic, the default is wrong and it needs to be changed to
DocumentRoot "/opt/bitnami/apps/gitorious/htdocs/public"
This solved all my issues I believe.

Related

Permission denied error when creating cache folder - Apache httpd

I am using Apache HTTPD with the Dispatcher module running on RHEL.
The dispatcher works fine but it's unable to cache the file. On inspecting the logs I see the following error -
Unable to create parent directory /var/www/html/bla/bla/static: Permission denied
My apache is running with the default user and usergroup - apache
I have also changed the ownership of my docroot (/var/www/html) to apache.
drwxrwxrwx. 20 apache apache 278 Jun 14 04:08 var
Does anyone know what the problem is? Please help!

AH01630: client denied by server configuration but require all granted is set (Apache 2.4, CentOs)

I am using Apache 2.4 on CentOs to power my website. However, I always get a 403 forbidden error when trying to access the website through my browser. When I consulted the file error_log in the log directory of /etc/httpd, I repeatedly see the error:
AH01630: client denied by server configuration
I have read in the Internet as well as in multiple StackOverflow questions that you can solve this error with Require all granted in the html directory configuration of the httpd.conf file (/etc/httpd/conf/).
I have configurated this directory (through which I am hosting my website) like recommended above (it was already configurated). The error persists, so there must be another problem in the server configuration that denies access to my website. My httpd.conf file is not changed at all, it is the default file that gets downloaded when installing Apache 2.4. Does anybody know why this error occurs? Can somebody explain to me what else can cause this error? I have looked everywhere in the internet for this error (links below) but nothing could help me at this problem.
I have no .htaccess file in my website. Only an index.html file to test it.
Stack Overflow Question: "Apache2: 'AH01630: client denied by server configuration'"
Apache Wiki
Serverfault
I just deleted the whole HTTPD configuration and then reinstalled Apache. I had to enable PHP too by using these lines of code:
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Then Apache worked flawlessly.

No permissions on htaccess file

I'm trying to setup a vagrant box with a lamp stack and was mostly successful. However, now I'm stuck with the error "Server unable to read .htaccess file". My setup is a Centos 7 server with Apache 2.4 and PHP 5.6.
Apparently, this seems to happen a lot as I saw many people ask that question, but here's the thing:
1) All my folders are with 777 permissions
2) AllowOverride all and Require all granted is set on all of my folders
3) Even went so far as to add apache user to root group just to see if it would change something
I basically did everything that was suggested in all of the posts I saw and still, apache can't read the .htaccess file.
In my logs, I see:
[Tue Sep 26 15:20:18.178541 2017] [core:crit] [pid 6491:tid 139938095892224] (13)Permission denied: [client 10.0.2.15:52176] AH00529: /var/www/html/Kalendho/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/html/Kalendho/public/' is executable
So I presume apache actually find the file, but for some reason, cannot open it even though it should be able to. So really, any help would be greatly appreciated as I'm currently at my whit's end here.
Thanks in advance
Okay, so apparently, it was an issue with selinux. Here's what I did:
Opened the file /etc/selinux/config and changed the following line:
SELINUX=enforcing
to
SELINUX=disabled
After that, I rebooted my machine and it got rid of the htaccess error.

How to run apache as non-root, using non-standard ports?

I need to get apache running as a non-root user, listening to port 8443, in order to have a new website available (on localhost:8443) for internal security scanning, on a CentOS 7.3 system. I understand only the basics of apache (on Ubuntu), and I am NOT a web administrator, so am unfamiliar with the many options / config settings necessary to get this to work.
I have a directory (/webcontent) with my website content (which requires php), and can host there the various conf files necessary. But I am stumbling through getting httpd.conf setup properly for apache to run as a local user, launched with:
httpd -f /webcontent/conf/httpd.conf
And have set the logs to write to /webcontent/logs (via ErrorLog parameter), but it then complains about not having write access to /run/httpd, and so won't actually start:
[Thu Feb 23 11:59:51.289587 2017] [auth_digest:error] [pid 25464]
(13)Permission denied: AH01762: Failed to create shared memory segment
on file /run/httpd/authdigest_shm.25464
I imagine this is only the first of many problems I might have to get this running, so if anyone can point out the specific config settings necessary in httpd.conf (or elsewhere?) to get this scenario to work, that would be very much appreciated. Or has any other suggestions on running a non-root instance of apache for testing.
A bit late, but I see there's no answer so far. I just ran into this issue myself. My solution is below.
Use the DefaultRuntimeDir directive to override the default "/run/httpd" directory. This goes in httpd.conf. For example:
DefaultRuntimeDir "/my/local/rundir"
This will cause apache to create "/my/local/rundir/authdigest_shm.1234"
For some reason this doesn't also override the default pid file directory, so set it with the PidFile directive, e.g.:
PidFile "/my/local/rundir/httpd.pid"
You might also want to look at the ServerRoot directive.

Can't run any file named install.php on localhost due to apache's access_compat

I'm getting a weird problem here.
I have at least 30 localhost WordPress installs made before and every one of them went fine.
Now (after re-installing Win7 and XAMPP) I can't access ANY install.php file (whether it's WPs own, a dummy empty one, etc). Also, it doesn't matter where it's located (wp-admin folder, a random place outside WP, htdocs root folder, etc).
This is not an antivirus or Windows firewall problem.
It seems to be coming from apache itself.
The apache error log says this
[Fri Nov 30 16:46:40.223524 2012] [access_compat:error] [pid 5876:tid 1604] [client ::1:59365] AH01797: client denied by server configuration: D:/xampp/htdocs/vmf05/wp-admin/install.php
Does anyone have a clue on this?
I've went through all the normal steps and haven't found a solution yet.
Also, if I disable the access_compat module, apache won't start.
Thanks in advance for your help.
I can't believe what the problem was!
I moved a .htaccess file that had the WP better security directives to the root of xampp's site as a backup, and forgot to move it back after.
No install.php file ANYWHERE could be accessed since it had the following:
<files install.php>
Order allow,deny
Deny from all
</files>
And, since the file was on the root, it was affecting the whole server.