Need help with apache2 configs/webmin/and virtualmin service

5 posts / 0 new
Last post
#1 Mon, 03/28/2016 - 16:27
echoseven
echoseven's picture

Need help with apache2 configs/webmin/and virtualmin service

Here's what i'm running. installed webmin/virtualmin/usermin... using apache2. the normal default on webmin. i've created a virtual server with virtualmin.

the services are all good. everything works. no issues. except when i put my website up

my issue: the server doesn't see/read my .htaccess file.

with DEFAULT configs and all, here is what i changed: enabled rewrite apache mod in apache2 config. i also went into the virtual server settings and set AllowOverride None to All. it SHOULD be working now. however, its not.

here is my virtual server config:

SuexecUserGroup "#1007" "#1009" ServerName example.org ServerAlias www.example.org ServerAlias webmail.example.org ServerAlias admin.example.org DocumentRoot /home/example/public_html ErrorLog /var/log/virtualmin/example.org_error_log CustomLog /var/log/virtualmin/example.org_access_log combined ScriptAlias /cgi-bin/ /home/example/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted AddType application/x-httpd-php .php AddHandler fcgid-script .php AddHandler fcgid-script .php5 FCGIWrapper /home/example/fcgi-bin/php5.fcgi .php FCGIWrapper /home/example/fcgi-bin/php5.fcgi .php5 allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch Require all granted RewriteEngine on RewriteCond %{HTTP_HOST} =webmail.example.org RewriteRule ^(.) https://example.org:20000/ [R] RewriteCond %{HTTP_HOST} =admin.example.org RewriteRule ^(.) https://example.org:10000/ [R] RemoveHandler .php RemoveHandler .php5 php_admin_value engine Off FcgidMaxRequestLen 1073741824 DAV on AuthType Basic AuthName example.org AuthUserFile /home/example/etc/git.basic.passwd Require valid-user Satisfy All RedirectMatch ^/git$ http://example.org/git/gitweb.cgi RedirectMatch ^/git/$ http://example.org/git/gitweb.cgi RewriteEngine off AddHandler cgi-script .cgi Require user admin

and my .htaccess file inside my website directory

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

(all this does is rewrite all http requests to https to use SSL.)

Mon, 03/28/2016 - 21:07
andreychek

Howdy,

Well, just as an experiment -- what happens if you add this to the top of your .htaccess file:

deny from all

Does that prevent your website from loading, and show a denied error?

-Eric

Mon, 03/28/2016 - 22:25 (Reply to #2)
echoseven
echoseven's picture

thanks. that worked, so i figured it didn't like the.. i guess.. php wrapper it put it in. took a while to disable. now instead of that site being owned by the user, its now owned by www-data and being directly handled. some stuff broke, but that's ok. this is the only domain being handled by this server. this being the main domain and not one of our subdomain sites, such as minecraft or you know.. other random subdomains that aren't our main website, i'd rather have it working than not.

anyway, you helped show me it WAS working, but i guess something was up with the config, so i just kinda went in and removed a bunch of stuff i'd only use for virtualmin IF i was letting other users sign up for domain hosting and such... which i'm not, so i didn't need. thanks again.

Mon, 03/28/2016 - 22:28
echoseven
echoseven's picture

to be super clear, the issue was solved and you did help. thanks.

Mon, 03/28/2016 - 22:58
andreychek

That's great, I'm glad you were able to get it working!

-Eric

Topic locked