Hi all,
I'm having a hard time fixing my webserver and can't for the life of me work out what is going on.
I've been messing with Linux for a few years now, so I know my way around the system, but am in no way a pro or expert.
My setup is a little unique, but nothing 'out there'.
Server is running ClearOS 6 which is also my firewall/router. It is based on CentOS 6.5
Issues appears to have started occuring after I installed OwnCloud.
I have installed OwnCloud 7 from the Suse repository and it installed ok.
Web server is Apache 2.2
SElinux is disabled on this box (which is default for ClearOS I believe).
The issue only started happening after owncloud was installed.
I run a number of websites off this box which are as well as a few redirected sites hosted on other boxes on the internal network set as virtual hosts.
The webserver conf files are autoconfigured originally then I have customized them afterwards, everything has been working fine until I installed OwnCloud.
Since I have installed Owncloud, the owncloud URL works, my redirected sites work fine, but I can not access any other website on the server.
The 80.conf and 443.conf are below, as is the extra OwnCloud conf that it installed. IP's and domain names have been removed.
HTTP/80 CONF File
Code:
#----------------------------------------------------------------
# WARNING: This file is automatically created by webconfig.
#----------------------------------------------------------------
# Authentication mechanism
DefineExternalAuth pwauth pipe /usr/bin/pwauth
DefineExternalGroup pwauth pipe /usr/bin/unixgroup
# -----------------------------------------------#
# Web Site
# -----------------------------------------------#
ScriptAlias /flexshare/portal.#####.net/cgi-bin/ /var/flexshare/shares/portal.#####.net/cgi-bin/
<VirtualHost *:80>
ServerName portal.#####.net
ScriptAlias /cgi-bin/ /var/flexshare/shares/portal.#####.net/cgi-bin/
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined
Redirect / h#tps://portal.#####.net/
</VirtualHost>
<VirtualHost *:80>
ServerName marryme.#####.net
DocumentRoot /var/www/html/marryme
ScriptAlias /cgi-bin/ /var/flexshare/shares/portal.#####.net/cgi-bin/
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined
<Location />
Options Indexes FollowSymLinks MultiViews
Satisfy Any
Allow from all
</Location>
</VirtualHost>
<VirtualHost *:80>
ServerName #####.net
DocumentRoot /var/www/html
ScriptAlias /cgi-bin/ /var/flexshare/shares/portal.#####.net/cgi-bin/
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined
<Location />
Options Indexes FollowSymLinks MultiViews
Satisfy Any
Allow from all
</Location>
</VirtualHost>
<Directory /var/www/html/cgi-bin>
Options +ExecCGI
</Directory>
<Directory /var/www/html>
Options -Indexes +FollowSymLinks +IncludesNOExec
AllowOverride All
Order deny,allow
Allow from all
AddType text/html .php
AddHandler php5-script .php
</Directory>
HTTPS/442 CONF File
Code:
#----------------------------------------------------------------
# WARNING: This file is automatically created by webconfig.
#----------------------------------------------------------------
NameVirtualHost *:443
# Authentication mechanism
DefineExternalAuth pwauth pipe /usr/bin/pwauth
DefineExternalGroup pwauth pipe /usr/bin/unixgroup
# -----------------------------------------------#
# Web Site
# -----------------------------------------------#
<VirtualHost *:443>
ServerName portal.#####.net
DocumentRoot /var/www/html/portal
ScriptAlias /cgi-bin/ /var/flexshare/shares/portal.#####.net/cgi-bin/
ErrorLog /var/log/httpd/error_log
CustomLog /var/log/httpd/access_log combined
ProxyPreserveHost On
ProxyRequests off
ProxyPass /cp/ h#tp://0.0.0.0:8082/cp/
ProxyPassReverse /cp/ h#tp://0.0.0.0:8082/cp/
ProxyPass /sb/ h#tp://0.0.0.0:8081/sb/
ProxyPassReverse /sb/ h#tp://0.0.0.0:8081/sb/
ProxyPass /blue/ h#tp://0.0.0.0:80/
ProxyPassReverse /blue/ h#tp://0.0.0.0:80/
ProxyPass /sab/ h#tp://0.0.0.0:8080/
ProxyPassReverse /sab/ h#tp://0.0.0.0:8080/
ProxyPass /nzbdrone/ h#tp://0.0.0.0:8989/nzbdrone/
ProxyPassReverse /nzbdrone/ h#tp://0.0.0.0:8989/nzbdrone/
SSLEngine On
SSLProxyEngine On
SSLCertificateKeyFile /etc/ssl/ssl.key/portal_#####_net.key
SSLCertificateFile /etc/ssl/ssl.crt/portal_#####_net.crt
SSLCertificateChainFile /etc/ssl/ssl.crt/portal_#####_net.ca-bundle
# No weak export crypto allowed
# SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:!EXP:+eNULL
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
<Location />
Options Indexes FollowSymLinks MultiViews
Order allow,deny
allow from all
AuthType Basic
#AuthType form
#AuthFormLoginRequiredLocation h#tps://portal.#####.net/login.html
#Session On
#SessionCookieName session path=/
#SessionCryptoPassphrase secret
AuthName "Restricted - #####.net Portal"
AuthBasicProvider file
AuthUserFile /etc/httpd/passwd/passwords
Require user #####
</Location>
#<Location /login.html>
#SetHandler form-login-handler
#AuthFormLoginRequiredLocation h#tps://portal.#####.net/login.html
#AuthFormLoginSuccessLocation h#tps://portal.#####.net/index.html
#AuthName "Restricted - #####.net Portal"
#AuthBasicProvider file
#AuthUserFile /etc/httpd/passwd/passwords
#AuthType form
#Session On
#SessionCookieName session path=/
#SessionCryptoPassphrase secret
#</Location>
</VirtualHost>
OwnCloud CONF File
Code:
<IfModule mod_alias.c>
Alias /owncloud /usr/share/owncloud/
</IfModule>
<Directory /usr/share/owncloud/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Accessing these sites:
/var/www/html/portal - h#tps://portal.#####.net
/var/www/html - h#tps://#####.net
Gives me a 403 forbidden:
Forbidden
You don't have permission to access / on this server.
I went through a bunch of testing, and I worked out that if I set permissions on /var/www/html/ to 0771 (so execute for everyone) everything starts working again.
This works for a while, for example if I set it now, it will be fine for the rest of the day, I log in again tomorrow and the permissions have reset again back to 0770. The server hasn't rebooted so something is resetting the permissons.
The only thing that has changed is that I installed OwnCloud.
Would welcome any assistance