View Full Version : Setting the path for applications installed from the manager's control panel

07-20-2006, 10:33 AM
This may be a little picky but I would love to be able to install applications from the manager's control panel to a specific folder.

By default apps are installed to the base webroot folder at /var/www/html/ and it would be cool, for example, to copy all of the site administration stuff to an admin folder so that it doesn't clutter up the root.

Perhaps, as a minimum, WestHost could change the default install folder from the webroot to webroot/siteapps/ or something like that.

Thanks! Again, I know that I am just being anal. :)

PS - is there anyone else who would like to see this?

07-20-2006, 06:06 PM
Most the applications that are installed in your public www root i.e. /var/www/html have to be in that folder since they are accessed via that web. Applications that do not need to be accessed via the web are already normally installed in other places.

It might be nice to be able to choose the directory within the public www root for installs but would make it very hard for WestHost to maintain or support them I think. Just about anything like that can be installed manually (which does give you that option) just as easy almost. :) phpBB, WordPress, ect.

07-21-2006, 02:39 AM
I would love to have an empty web root!
I'm tired of explaining to customers why the web site that I provide them has all that junk in it. The most that should be in a new installation is a dummy index.html and an empty cgi-bin directory. That's it.

AJ, it's not being anal. If I add up the time I've spent over the years that I've been with WH answering questions about why and what the manager and user directories are and so on. And why when they try to do an automatic backup of their web root they got all those 'access denied' errors because you can't backup the manager directory... and so on. It's a considerable amount of time.

OK, I feel better now.... :)

07-21-2006, 07:30 AM
I do agree with Jalal when it comes to File Manager, Site Manager, vdsbackup and user directories that are in the web root. It would be nice if those where located outside of the web root. I would think they could be some place like /var/www and that then an alias for them could be created just like there is for the icons directory. This would make them available via the browser but leave them invisible to users who are new to West Host.

07-24-2006, 01:31 PM
Ugh! Jalal, that does seem like a real hassle! I installed vdsbackup but I havenít had the chance to run though it yet. It sounds like Iíll have to plan on a bumpy road.

I appreciate the comments posted so far. I can also appreciate the fact that Westhost has to support these applications (e.g., site manager, file manager, vdsbackup, etc.) and users with different levels of experience. I can definitely see some potential support problems if Westhost were to allow users to install apps from the Westhost control panel to any folder.

It still seems like, where possible and when appropriate, the model should be to install site support apps that need to be available through the browser to a single folder off the webroot. This would create a more distinct barrier between my web docs and Westhost management applications and still allow me to install my own support apps to the same single support folder.

For me, I moved/installed what apps I could (e.g, PHPMyAdmin, UebiMiau mail, Guestbook, etc.) to a webroot/siteadmin/ and then created an admin page with links to the site apps. This should get me by for now until there is a cleaner approach.

08-01-2006, 03:56 PM
I would prefer that all extra programs and folders be below the webroot. This is pretty standard on most Hosting sites. When you get started, pretty much all you see is your index.html and the cgi bin folder. Folders such as your Manager folder would be more secure with that type of setup. As for the other programs such as phpBB, I just install them myself.

I don't use the Website Builder Program because it would overwrite everything I have right now. It really should generate those files in a folder because you might not like the end result and then you've wiped out everything. That's not appealing to me lol. It's easy enough to move those files out to the front once you are satisfied with what you have created. I use an index.php and an index.html would take charge if one is generated................ewwwwwwwwwwwwwwwwwww lol.

08-27-2006, 11:28 PM
Agreed whole heartedly on having a clean webroot and cgi-bin. (And on user specified directory paths under the webroot for control panel installed web accessible applications.)

I am accustomed to a webroot of $HOME/www [/home/$USER/www]. I think it is a more organised method and programmatically allows use of the $HOME and $USER variables rather than providing literal static pathnames.

I just made a post about changing my own filesystem hierarchy (http://forums.westhost.com/showthread.php?p=32746#post32746) here:

Of course, I know it would be a huge deal for Westhost to change all user accounts over to a new directory structure. Perhaps in a v3.0 implementation.


09-26-2006, 09:53 PM
I too am pretty disappointed at the root clutter. I've never seen it anywhere else. Others have said they understand WH's motives, but I have to say that since I've never seen other hosts do things this way, I'm not sure I do understand.

Luckily, I'm in my first 30 days and I haven't married myself to WestHost yet. I recognize that this could be a very minor annoyance to many people, but in all honesty it may be a deal-breaker for me. WH came recommended, so I'd like to give them a try, but this is really bugging my aesthetic & organizational sensibilities.

09-27-2006, 08:39 AM
I wanted to clarify the difference between root and public root. Most shared hosting companies (which are the majority of types) well take you direct to your "public root" when you sign in and this is normal. In fact you do not have access to anything above that because of the nature of shared hosting.

With a VPS account you are logged into the "root" of your account. Remember that we each have our own version of Apache, PHP, Mysql, ect running which is what gives use many added benefits and security from other accounts on the server. You do not have that on normal shared hosting since you share those with all the other folks on the server.

It can be daunting when you first encounter it but just remember that /var/www/html/ is the location that you would normally be thrown into with a shared hosting account and go to there. In fact you should be able to set up your FTP program to go there on log in if you want and simply ignore the rest of the set up till you find the need to tweak something on your account. :)

09-28-2006, 06:02 PM
Has anybody tried playing around with their httpd.conf file to see where the site manager installs apps? Does it install them to DocumentRoot or /var/www/html ? (I know these are the same by default) Could we mess around with things and have the site manager install to /var/www/html and have DirectoryAliases or subdomains with our code in var/www/htdocs?

I don't have time to play at the moment. Maybe in a few weeks time, unless someone has the answers already :-)


09-28-2006, 09:37 PM
I am pretty sure that httpd.conf has not effect on the SiteManager. Although you access Site Manager via your site the "program" and scripts that it runs on are on anouther server.

DirectoryAliases or subdomains can always be what ever you want them to simply by setting their path to what you want when you create them up. I keep all my sub domains outside of /var/www/html. The WestHost VPS system does not use /var/www/htdocs so there is no reason why you couldn't create it and point all your subs and aliases to that area but you would not be able to affect Apps that installed via the Site Manager.

09-29-2006, 07:59 AM
I realise that the Site Manager application runs on a different server, but what Mr.AJSlackmeyer was trying to achieve (and many of us would agree with) was a clean webroot without all of the Westhost litter. Since we cannot change the SiteManager, we must stick with the Westhost applications in /var/www/html and create our own webroot of (say) /var/www/html/mine or /var/www/htdocs by changing the DocumentRoot in our httpd.conf file.

We could then define as many aliases as we liked in our httpd.conf, or create symbolic links to the Westhost apps somewhere within our webroot's tree. (Disadvantage of Aliases: Apache requires a restart every time you make an edit, uses more memory and is slower to load, disadvantage of SymLinks: create clutter)

It all depends on whether the Site Manager is hard coded to install stuff in /var/www/html or dynamically selects the directory defined by DocumentRoot.


09-29-2006, 08:21 AM
Ahhh.... ok I see where you are going now! Sorry I miss understood. That may work but you would have to look very close at web apps like phpBB, Gallery and such that are "web pages" for your site to make sure there where not any conflicts. You might run into some permission problems with like Gallery when uploading files. I think you would also have to add in then some <Directory> settings for /var/www/html to make sure that .htaccess would still work for your Site Manager and other things like phpMyAdmin. I don't think the Aliases would cause too much of a problem with memory or load although you are correct any time you added a new App you would have to add in the new aliase although if you did it via the Site Manager you would not have to restart since Site Manager does that for you when you add them.

09-29-2006, 08:47 AM
Just had a quick try and it looks promising:

* Create /var/www/html/index.html "This page is served from /var/www/html"
* mkdir /var/www/htdocs
* Create /var/www/htdocs/index.html "This page is served from /var/www/htdocs"
* Open http://www.mydomain.com/ - served /var/www/html/index.html
* Edit /etc/httpd/conf/httpd.conf
* Change DocumentRoot from /var/www/html to /var/www/htdocs
* Restart Apache using "restart"
* Open http://www.mydomain.com/ - served htdocs file
* Login to Site Manager using 69.36.161.xx
* Install phpBB
** FAILED ** The phpBB install failed: ?o$F??NQ]@0?N^
* Install Perlfect Search (CGI script) OK
* Clicked on link to access Perlfect Search
* Uninstall Web Password - Removed from /var/www/html
* Reinstall Web Password - Installed to /var/www/html

I suspect the phpBB installation problem has something to do with my installation of MySQL rather than the change to DocumentRoot - I must fix that one day ;-)

The script alias for cgi-bin is still valid, so Perlfect Search worked OK.

I later added this alias to my httpd.conf

Alias /wh/ "/var/www/html/"
<Directory "/var/www/html">
Options MultiViews
AllowOverride None
Order allow,deny
Allow from all
and changed the <Directory> entry for /var/www/html to htdocs

<Directory "/var/www/htdocs">
Options FollowSymLinks MultiViews Includes ExecCGI
AddHandler cgi-script .cgi .pl .py .sh
AllowOverride All
Order allow,deny
Allow from all

NOTE: There are other changes required in httpd.conf and elsewhere - this test was just to illustrate the feasibility of separating applications and your own code.

The following applications do not work as intended - check /var/log/httpd/error_log for broken links
joomla - see http://www.joomlaya.com/forums/showthread.php?t=2702
pma (phpMyAdmin)
wordpress - see http://codex.wordpress.org/Moving_WordPress

The following appear to work fine ...
aem (Apache Error Message)
fm (FileManager)
uebimiau (WebMail)
users (User Control Panel)

09-29-2006, 04:04 PM
I think the answer for both joomla and phpBB might be in the include to the configuration files. I am pretty sure that with phpBB it is a relative path that is used to call the config and you would need to change that to an absolute call or adjust the relative path. More then likely the same goes for WordPress.