Hi, having created a virtual server I am getting the dreaded 403 error. I have checked past posts on the forum and tried several things but to know avail.
The log file for the domain is showing the following;
“[Mon Jul 21 12:07:59 2014] [crit] [client 18.104.22.168] (13)Permission denied: /home/newstar/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable”
the htaccss file is set to 755
The .htaccess file should be located in your “public_html” directory or the proper sub-folder. Right now it seems that it’s located outside of your document_root folder, from where Apache probably cannot read it (haven’t tested this scenario myself).
How exactly did you create the .htaccess? Through Webmin, Virtualmin or manually?
It just appeared automatically when the website was created. I have deleted it from the root folder and now there is one in the public_html folder but still coming up with same error.
Thing is if I goto https://website.com: then the port for virtualmin it works.
Okay, that’s really odd. I’ve never seen Virtualmin put an .htaccess file directly in the home directory. It should only create those under public_html when you specifically use that function.
There seems to be something quite odd about your installation. I’m afraid without seeing your system for myself I don’t really have an idea at this time what could be wrong.
your telling me, i’ve been trying on and off for about 5 months now trying to get a server and website with thunderbird up and running and have reinstalled no end of times, but just seem to get no where. Is it best to install virtualmin close to a server set up or after all other things have been installed, ie mod security, zend etc. and is it best to configure virtualmin/webmin before creating a website or after? If you want access to have a look that isn’t a problem as I want this up and running as have another server to set up as well so I can move some other sites and stop paying a hosting company.
What do you mean with “a website with thunderbird”? Thunderbird is an email client, not a web browser.
It’s best, and actually very much recommended, to install Virtualmin immediately on a clean new minimal OS install (ONLY SSH, no other hosting packages!) using the installer script, then run the post-install wizard and configure Virtualmin.
When that’s done, you can add any other stuff you need like mod_security and then create websites.
I’d suggest you start fresh as outlined above (what distro are you using?) and don’t install any custom stuff / don’t do custom configs for now. When done, feel free to contact me on Skype (user “Loc2262”) if you’re still having problems like the .htaccess or Thunderbird configuration issues.
right order I set server up was;
change server password after installing Centos 6.4
add nano as an editor
disable root ssh access and change port
add an ssh welcome message install virtualmin by doing wget http://software.virtualmin.com/gpl/scripts/install.sh then sh ./install.sh in server root
once installed changed webmin and usermin ports
updated packages and the os in virtualmin to centos 6.5
installed epel repo
install gd graph and imagemagick
secure /tmp, /var/tmp and /dev/shm (http://linuxhostingsupport.net/blog/howto-secure-tmp-and-devshm)
secure apache (http://www.tecmint.com/apache-security-tips/)
install modsecurity and modevasive
then went through trying to set up webmin to what was needed before creating a website. But must have messed things up within webmin.
What should be the basic things to configure before you add a website? I am assuming just server templates and account settings
finally the server is being set up as “server1.webdomain.com” with ns1.webdomain.com as the nameservers
and the first website to be created on the server will be webdomain.com
I’m sorry, but it’s very hard for me to reproduce what could be wrong now. I’m not really familiar with CentOS (Eric could say more here I think). What could maybe interfere with proper operation is upgrading to CentOS 6.5 (again, Eric knows more about this; maybe you should use 6.5 to begin with instead of upgrading after Virtualmin is installed) and activating this “Epel repo”. I’ve read a number of times here that using these third-party repositories can lead to problems with Virtualmin on CentOS.
6.4 is what is offered by the vps provider to install its virtualmin that detects there is a 6.5 version, activated the epel repo as its easier to install mod security and other things with it., but will try again
ok totally reinstalled and added virtual server straightaway and bang same thing happened. However I have found the issue. For some reason when a new virtual server is created it is adding the following line in the apache directives;
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
so I removed the - before Indexes and refreshed the page and hey the site appeared.
So question now is where in the apache webserver config do I change it so that the - before the indexes is not automatically added on virtual server creation.
It’s normal to see a 403 error, prior to the website being uploaded.
Once you upload a website, it will work properly (assuming your website includes an index page, such as index.html or index.php).
If you don’t want that to happen, you can edit the default Apache template that is used for new domains.
To do that, go into System Settings -> Server Templates -> Default -> Apache Website, and there you can edit the options set in “Directives and settings for new websites”.