Configuring APACHE, where do I place my website?
Hello guys, here at work I installed a LAMP server and everything seems to be working fine for now.
We want to use Apache to host a page in our intranet. The thing is, I'm a newbie in these things, but I was able to install the LAMP server and ssh and configure MYsql so I think I can go through the rest. I'm able to see a little web page that I place at the /var/www directory. Before this I was able to see the page that says: "If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page". Can I create folders like for example:
I'm able to make the folders but I have to type the entire path: myserver.com/public_html/page.html
I have experience using those hosting companies in which they have everything organized the way is
above. How can I make this happen where do I place my website so users don't have to type the entire
path? Let me know if I'm explaining myself well...
Thanks for the help....
the default location that apache uses is /var/www/html. this location is defined in your httpd.conf file as DocumentRoot for the default virtual host. you can go in and change that to your hearts content, but generally there is little benefit in doing so.
So I need to create the html folder? Correct or not? I'm using the Ubuntu LAMP server. I will give it a try.
When I type the server's address I get:
Index of /
Name Last modified Size Description--------------------------------------------------------------------------------
Joomla1-0/ 01-Aug-2006 18:05 -
apache2-default/ 01-Aug-2006 12:42 -
html/ 01-Aug-2006 12:42 -
public_html/ 01-Aug-2006 16:38 -
I though I will be able to see the index.html instead of this. How can I make this happen??
well where is that directory? looks like you've changed the DocumentRoot directive or something. there is no index.html visible there so it couldn't display it.
The index.html is inside the /html folder. Should I place it on the var/www? I thoght it should be inside the /html or /public_html directory just like in those hosting companies. So please let me know how do you organize this thing? Can it be done the way I though or everything should be place at /var/www?
Well, there's a bit of a difference here. Those hosting companies are running virtual servers from within Apache.
Your current document root is /var/www
If you want a "simple" server, you can just place everything in there, and ignore the public_html directory. The concept of public_html is to allow files to be served from a user-accessible directory.
i.e. if your web host (bigcompany.com) has clients Mr. Smith (smith.com) and Mr. Jones (jones.com) they could set it up as follows:
/var/www (bigcompany.com's site)
Now, smith.com will be served out of /home/smith/public_html but that directory will appear to be the top level./public_html
I usually set this up on systems so that users can have their own personal web space, but it is midifiable from within their home directory (to keep permissions and ownership simple) and also, being in their home directory, the space is calculated as part of their quota for /home.
These can also be accessed without virtual servers, by using the ~ preceding the user's home directory - i.e. in the above setup, with only one virtual server (the default) and with public_html enabled:
typing in www.bigcompany.com will serve from /var/www
www.bigcompany.com/~smith/ will server from /home/smith/public_html
Thanks jantman, you sure can be a teacher, (clear explaination)!!
|All times are GMT -5. The time now is 03:56 PM.|