LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-01-2007, 03:21 AM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 952

Rep: Reputation: 32
Apache on Ubuntu


If fired up the Apache on Ubuntu by installing the lamp server.

Question: Does Apache set the default path as /var/www or/var/www/apache2-default

wondering if i load a index.html file into /var/www would that be the correct thing to do.

running a local IP to check if apache works, brings up the directory of /var/www

my system thats running my site now ( tiny sofa ) sets it as /srv/www/html

TT
 
Old 06-01-2007, 03:40 AM   #2
flupke
Member
 
Registered: Jun 2005
Location: BE
Posts: 30

Rep: Reputation: 15
I assume that by "default path", you mean the directory where the html files have to be published.

I looked at the config on an ubuntu 7.04 and I saw that the default configuration is stored in /etc/apache2/sites-enabled/000-default. In this file, you can see a line
Code:
DocumentRoot /var/www/
You have your answer!

about apache2-default : you can see a commented line that says
Code:
#RedirectMatch ^/$ /apache2-default/
If you uncomment this line, then when you access the something like "http://localhost/", you will be redirected to "http://localhost/apache2-default".

If you want to setup a site on the apache provided by ubuntu, your best bet is to create a new virtualhost file in /etc/apache2/sites-enabled/. You can copy and adapt the 000-default file to fit your needs


HTH
Flupke
 
Old 06-01-2007, 04:42 AM   #3
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 952

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by flupke
I assume that by "default path", you mean the directory where the html files have to be published.

I looked at the config on an ubuntu 7.04 and I saw that the default configuration is stored in /etc/apache2/sites-enabled/000-default. In this file, you can see a line
Code:
DocumentRoot /var/www/
You have your answer!

about apache2-default : you can see a commented line that says
Code:
#RedirectMatch ^/$ /apache2-default/
If you uncomment this line, then when you access the something like "http://localhost/", you will be redirected to "http://localhost/apache2-default".

If you want to setup a site on the apache provided by ubuntu, your best bet is to create a new virtualhost file in /etc/apache2/sites-enabled/. You can copy and adapt the 000-default file to fit your needs


HTH
Flupke
Thanks for that Flupke, i'll look into it

TT
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2.0 won't install on Ubuntu 6.06 zener Linux - Server 2 11-29-2006 05:24 AM
Ubuntu 5.10 Apache problem markb658 Ubuntu 6 05-18-2006 04:23 PM
Ubuntu with apache? Cliekid Ubuntu 1 05-13-2005 11:43 PM
Apache 2.0 on Ubuntu Linux spacy2003 Linux - Software 5 02-04-2005 02:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration