Tom Elsesser wrote:
Karanbir Singh wrote:
the 'normal' way to do this is to setup a vhost in /etc/httpd/conf.d/
Thanks for the quick reply. I admit to not knowing much about apache, so forgive if this all sounds silly.
I was looking at virtual hosts all day and just ended up confused and bitter, getting "you don't have access to / on this server", but I thought vhosts went into /etc/httpd/conf/httpd.conf? My conf.d dir has stuff like squirrelmail aliases. I need content for the site itself, so I didn't think an alias would work.
you dont need to touch httpd.conf at all, just setup all your Virtualhosts in seperate files ( I do, somepeople just use a vhosts.conf ) in /etc/httpd/conf.d/ and you wont need to worry about conf file mangling / handling when the httpd package updates, and moving config's, data, html stuff becomes real easy between machines.
There is an example VirtualHosts setup ( the last few lines in /etc/httpd/conf/httpd.conf ), just copy that and paste it into a new file in conf.d/ - and remember you need to enable the NameVirtualHost <ip>.
everything in the conf.d/ directory that ends in a .conf is parsed and used as config material by httpd.
" chcon -R -u system_u -r object_r -t httpd_sys_content_t /home/<username>/public_html/ "
I had absolutely no idea about this command. The man page is fairly sparse, so I'll take you obviously knowledgeable word on this one.
chcon will handle / setup SELinux context's for httpd to access the content.