Default Document Root directory not working

8 posts / 0 new
Last post
#1 Fri, 07/29/2011 - 13:16
louminsk

Default Document Root directory not working

Hello

I m running Centos 5.6/php 5.3/mysql5.5/phpadmin5.4

I discover Vitualmin/webmin coming from plesk experiences

After a yum with specific repositories , everything rocks very nicely for all the virtual host (virtual1.com / virtual2.com…) and super happy with no more issue with privilege with Joomal evan in Apache mod

I have a host name server , toto.com after editing /etc/hostname

I could access to the Webmin/Virtualmin interface with no issue https://toto.com:10000

I could access to the phpadmin interface also https://toto.com/phpmyadmin

i was expecting arrive to the default apache webpage with http://toto.com

and in fact in that case i m redirect to one one the virtualhost (virtual1.com)

In the Webmin Apache Serveur Setting for the default server

i fill as root directory /var/www/html (in place of default) and restart the httpd service :same issue

i done also a try editing directly the httpd.conf file adding DocumentRoot "/var/www/htmll" : same result

i was trying also doing the same thing with a different root directty /home/httpd/html" (i create the folder and put an index.thml in same result

I don't why this not working

Before the install of Virtualmin/Webmin i was correctly redirect to the default Document Root directory with the default Apache page

Thanks for any help

philippe

Fri, 07/29/2011 - 13:30
Locutus

Try setting the listen address for the virtual server that hosts the /var/www from "Any" to the IP address of your external interface in Webmin's Apache module. That might help.

Has to do with the (rather complex) way Apache determines which vserver to serve a request from. :)

Fri, 07/29/2011 - 14:41 (Reply to #2)
louminsk

Thanks Locutus for your fast answer If you are talking about the Webmin /Servers/ Apache Web Server menu my defaut server appear you are right with any in place of IP...but still looking where i could change this Webmin or http.conf manually? Global setup of Apache wher ther is the listening port doesnt change any to a specific IP Still looking...:-)

Thanks a lot

Also There is a way to not create a mail adresse each time i create an ftp user ? ( dont like the .usermin folder appear in the ftp for some client)

Thanks again

Fri, 07/29/2011 - 17:29
Locutus

You don't need to do that manually, you can make that change in Webmin. Click on the Apache virtual server, and on the bottom of the edit screen you'll find "Virtual Server Details / Address". There you choose the radio button next to the edit box and enter the IP address. Don't need to change the listen port / address of Apache itself!

You can avoid the creation of the .usermin folder if you "Add a website FTP user" (the link to the very right), though then the user won't have an own home directory at all, and will have access to the whole virtual server. If that's what you want, you're set.

Thu, 08/04/2011 - 19:47 (Reply to #4)
louminsk

Thks Locutus Its now perfectly working as i expected Really happy to make all my Joomla Website working in Apache-mod after just chmod once the full domain folder as apache:apache ,perfectly working and more secure ,all folder are 755 and file 644 including cache temp ..... Never sucess to make this working in Plesk

Next Step secure the server

Thanks Again

Fri, 08/05/2011 - 04:05
Locutus

You're welcome. :)

One step towards securing the server would be to use FCGId instead of the Apache mod_php, since then PHP is executed as the domain owner user, and not the web server. Additionally, when Joomla creates new files, they have the domain user as owner, instead of the web server user, avoiding problems when the domain owner later tries to do stuff with his files via SSH or FTP.

Mon, 08/08/2011 - 05:57 (Reply to #6)
louminsk

Thks Locutus :-) The reason i choose apache_mod is that is a way faster on my small dedicated server(processor nano |2go ram|1 gbit/s) than cgi...i will make a try with FCGId (never used).

i normally use a chmod script if i modify something by ftp...to maintain all files apache:apache but i try do to everything from the joomla panel in https

Was thinking apache_mod with the mod_rewriting and mod_security active was secure enough with all joomla folder 755 and document 644 (444 for configuration.php) but i really dont know alot concerning security issue exepct that i make a custom default admin users /access links and port for joomla admin and phpadmin and i put the webmin service off.i try to maintian all update .mail server off

thanks suggesting use FCGId

Mon, 08/08/2011 - 07:24
Locutus

Well, the main security "issue" with mod_php is that the PHP scripts run as the Apache user then. I.e. if one site gets compromised, the attacker has access to all other sites and everything that Apache can do.

If you're the only actual user of the system, as in it's not a shared hosting, that fact (along with the file owner thing) is not as grave, but should still be considered.

FCGI needs more resources (CPU and memory) though, that's the tradeoff indeed.

Topic locked