These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Virtualmin+EC2 on CentOS -> getting error 403 and 500 , Help Pleasssse :( on the new forum.
Hello Im running Virtualmin on Amazon EC2 and CentOS
I have mad a virtual sever using virtualmin, then i upload a simple html file there.
Document folder is : Home/Mydomain/public_html
When i try to access my domain, i get 403 error and in log file i have : (13)Permission denied: access to /index.html denied
Then i tried to add "Excecute" permission to "Mydomain" folder after i do that, i get 500 Error! and in logfile i have :
configuration error: couldn't perform authentication. AuthType not set!: /index.html
Please someone help me here :( what am i doing wrong? what changes should i make to make it working?
Thanks
Howdy,
Hmm, normally what you're doing works out of the box... it sounds like there may be some non-default config settings causing what you're seeing.
Do you know if the Virtual Server owner attempted to setup authentication for that particular domain?
-Eric
Hi Eric
Thank you for reply
No i am not sure, how can i find that out?
is this relevant :
AuthName "mydomain.com statistics"
AuthType Basic
AuthUserFile /home/mydomain/.awstats-htpasswd
require valid-user
some extra things may help :
I didnt change my DNS name to point to EC2 server yet and im testing it by adding domain name to HOSTS file. is it important? i need to be sure its working before i go for changing DNS.
and here is the VirtualHost section of my httpd.conf
<VirtualHost 10.202.29.240:80>
SuexecUserGroup "#503" "#504"
ServerName mydomain.com
ServerAlias www.mydomain.com
ServerAlias webmail.mydomain.com
ServerAlias admin.mydomain.com
DocumentRoot /home/mydomain/public_html
ErrorLog /var/log/virtualmin/mydomain.com_error_log
CustomLog /var/log/virtualmin/mydomain.com_access_log combined
ScriptAlias /cgi-bin/ /home/mydomain/cgi-bin/
ScriptAlias /awstats/ /home/mydomain/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/mydomain/public_html>
Order allow,deny
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
<Directory /home/mydomain/cgi-bin>
allow from all
require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.mydomain.com
RewriteRule ^(.*) https://mydomain.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.mydomain.com
RewriteRule ^(.*) https://mydomain.com:9001/ [R]
<Files awstats.pl>
AuthName "mydomain.com statistics"
AuthType Basic
AuthUserFile /home/mydomain/.awstats-htpasswd
require valid-user
</Files>
Alias /dav /home/mydomain/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "mydomain.com"
AuthUserFile /home/mydomain/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php5
RewriteEngine off
</Location>
</VirtualHost>
and 10.202.29.240 is my private IP , is that correct?
should i give "Execute" permission to Home/Mydomain/ folder? (which cause error 500)?
i dont know what to do :(
Howdy,
Testing before going live?
You, sir, are very wise :-)
What is the output of these two commands:
ls -la /home/mydomain/
rpm -qa | grep http
Your config looks normal, but the output of those commands may assist in determining what's awry.
-Eric
Hi, Thanks for your help. I really appreciate that :)
Actually is live already, its under DOS attack and im moving it to AWS
Here is results :
ls -la /home/mydomain
total 80
drwxrwxrwx 14 mydomain mydomain 4096 Oct 14 13:37 .
drwxr-xr-x 5 root root 4096 Oct 14 13:37 ..
drwxr-xr-x 2 mydomain mydomain 4096 Oct 14 19:01 awstats
-rw-r--r-- 1 mydomain mydomain 27 Oct 14 13:37 .awstats-htpasswd
-rw-r--r-- 1 mydomain mydomain 18 Oct 14 13:37 .bash_logout
-rw-r--r-- 1 mydomain mydomain 294 Oct 14 13:37 .bash_profile
-rw-r--r-- 1 mydomain mydomain 124 Oct 14 13:37 .bashrc
drwxr-x--- 2 mydomain mydomain 4096 Oct 14 15:38 cgi-bin
drwxr-xr-x 3 mydomain mydomain 4096 Oct 14 15:38 etc
drwxr-xr-x 2 mydomain mydomain 4096 Oct 14 15:38 fcgi-bin
drwxr-xr-x 2 mydomain mydomain 4096 Oct 14 13:37 ftp
drwxr-xr-x 2 mydomain mydomain 4096 Oct 14 13:37 .gnome2
drwxr-xr-x 2 mydomain mydomain 4096 Oct 14 13:37 homes
-rw-r--r-- 1 mydomain mydomain 121 Oct 14 13:37 .kshrc
drwxr-x--- 2 mydomain mydomain 4096 Oct 14 13:42 logs
drwxr-xr-x 4 mydomain mydomain 4096 Oct 14 13:37 .mozilla
drwxrwxrwx 4 mydomain mydomain 4096 Oct 14 15:36 public_html
-rw-r--r-- 1 mydomain mydomain 27 Oct 14 13:37 .stats-htpasswd
drwxr-x--- 2 mydomain mydomain 4096 Oct 14 13:37 tmp
drwx------ 3 mydomain mydomain 4096 Oct 14 13:37 .usermin
rpm -qa | grep http
[root@ip-10-202-29-240 /]# rpm -qa | grep http
httpd-manual-2.2.15-29.el6.vm.1.noarch
httpd-tools-2.2.15-29.el6.vm.1.x86_64
httpd-devel-2.2.15-29.el6.vm.1.x86_64
httpd-2.2.15-29.el6.vm.1.x86_64
[root@ip-10-202-29-240 /]#
Howdy,
I find issue! it was a damn tricky one!
I should remove : "Require all granted" because its using Apache 2.2 (not 2.4)
And its working now like a horse ,lol
Thank you for your consideration and help.
Ali
Okay, there's two things I'd start with -- you'd want to make some permissions "755" rather than "777"... to do that, run these two commands:
chmod 755 /home/mydomain
chmod 755 /home/mydomain/public_html
After that, take a look in the public_html directory there... does it have a .htaccess file in it? If so, what are it's contents?
You can determine if you have a .htaccess file by running this command:
ls -a /home/mydomain/public_html