Distro CentOS 6.5 on a VPS
Virtualmin/Webmin/Usermin on Apache.
This was a long drawn out process. First I was creating the Virtual Servers within Webmin, I did a lot of work to get the php to work i those, but I did it. Then I went to try to set up the email accounts and all of them regardless of domain were showing up as user@webmin.domain.com and I couldn’t receieve mail to the actual user@domain.com. So I decided to just create a Virtual Server within Virtualmin and that worked for the email. I am not able to receive email to the user@domain.com, but with the settings that Virtualmin put into my httpd.conf file I was unable to connect to the site files. So I made changes to that information and here is my current issue.
If I navigate to www.domain.com I get a Forbidden You don’t have permission to access / on this server. error. But if I type in www.domain.com/index.php or www.domain.com/index.html the page will show up but those are missing the css and javascript because "Resource interpreted as Script but transferred with MIME type text/html: " But if I go to say www.domain.com/read.php which uses the same css and js files the page will load exactly as it should.
I tried setting the DirectoryIndex to just index.php and that doesn’t work. I’ve searched for over 10 hours trying to find someone else with the same issue and I’ve made changes to my httpd.conf file that I don’t even know what it should look like anymore. (Just making changes to the VirtualHost section)
Please let me know what information you need from me to help me fix this.
The repos that I used:
CentOS-Base.repo CentOS-Vault.repo Percona.repo vz.repo
CentOS-Debuginfo.repo epel.repo remi.repo
CentOS-Media.repo epel-testing.repo virtualmin.repo
The settings added to my httpd.conf file for the VirtualServer with the items commented out so that I could get working what is working.
<VirtualHost :80>
#SuexecUserGroup “#502” “#502”
ServerAdmin shawn@{DOMAIN}.com
ServerName {DOMAIN}.com
ServerAlias www.{DOMAIN}.com
#ServerAlias webmail.{DOMAIN}.com
#ServerAlias admin.{DOMAIN}.com
DocumentRoot /home/shawn/public_html
ErrorLog /var/log/virtualmin/{DOMAIN.com_error_log
CustomLog /var/log/virtualmin/{DOMAIN}.com_access_log combined
AddType text/javascript .js
AddType text/css .css
#ScriptAlias /cgi-bin/ /home/shawn/cgi-bin/
#ScriptAlias /awstats/ /home/shawn/cgi-bin/
#DirectoryIndex index.php index.html index.htm index.php index.php4 index.php5
#<Directory /home/shawn/public_html>
#Options Indexes FollowSymLinks
#AllowOverride All
#Order allow,deny
#Allow from all
#
#<Directory /home/shawn/public_html>
#Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
#Allow from all
#AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,S$
#AddHandler fcgid-script .php
#AddHandler fcgid-script .php5
#FCGIWrapper /home/shawn/fcgi-bin/php5.fcgi .php
#FCGIWrapper /home/shawn/fcgi-bin/php5.fcgi .php5
#
#<Directory /home/shawn/public_html>
#DirectoryIndex index.php
#order allow,deny
#AddHandler fcgid-script .php
#AddHandler fcgid-script .php5
#FCGIWrapper /home/shawn/fcgi-bin/php5.fcgi .php
#FCGIWrapper /home/shawn/fcgi-bin/php5.fcgi .php5
#
#UserDir “/www/shawn/public_html”
#DirectoryIndex index.php
#RemoveHandler .php
#RemoveHandler .php5
#php_admin_value engine Off
#IPCCommTimeout 101
#FcgidMaxRequestLen 1073741824
#SuexecUserGroup “#502” “#502”
#<Directory /home/shawn/cgi-bin>
#Allow from all
#AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,S$
#
#RewriteEngine on
#RewriteCond %{HTTP_HOST} =webmail.{DOMAIN}.com
#RewriteRule ^(.) https://{DOMAIN}.com:20000/ [R]
#RewriteCond %{HTTP_HOST} =admin.{DOMAIN}.com
#RewriteRule ^(.) https://{DOMAIN}.com:10000/ [R]
#RemoveHandler .php
#RemoveHandler .php5
#php_admin_value engine off
#IPCCommTimeout 9999
#FcgidMaxRequestLen 1073741824
#Alias /dav /home/shawn/public_html
#Alias /pipermail /var/lib/mailman/archives/public
#<Location /dav>
#DAV on
#AuthType Basic
#AuthName “{DOMAIN}.com”
#AuthUserFile /home/shawn/etc/dav.digest.passwd
#Require valid-user
#ForceType text/css .css
#Satisfy All
#RemoveHandler .php
#RemoveHandler .php5
#RewriteEngine off
#
#
#AuthName “{DOMAIN}.com statistics”
#AuthType Basic
#AuthUserFile /home/shawn/.awstats-htpasswd
#require valid-user
#
#AuthType Basic
#AuthName “{DOMAIN}.com”
#AuthUserFile /home/shawn/etc/dav.digest.passwd
#Require valid-user
#ForceType text/css .css
#Satisfy All
#RemoveHandler .php
#RemoveHandler .php5
#RewriteEngine off
#
#
#AuthName “{DOMAIN}.com statistics”
#AuthType Basic
#AuthUserFile /home/shawn/.awstats-htpasswd
#require valid-user
#
#RedirectMatch /cgi-bin/mailman/([^/.])(.cgi)?(.) https://{DOMAIN}.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$3
#RedirectMatch /mailman/([^/.])(.cgi)?(.*) https://{DOMAIN}.com:10000/virtualmin-mailman/unauthenticated/$1.cgi$3
AddType text/javascript .js
AddType text/css .css
Please let me know what other information is needed.
Shawn