LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-05-2015, 06:16 PM   #1
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 441

Rep: Reputation: 12
Where to place index.html when using Virtual Hosts on Ubuntu 14.04


Hi,

I created a virtual host on my machine(apache2). If I put index.html into my new virtual host document root /DB-Web it will not work. If I put the index.html in /var/www/html(the default document root), everything works including the applications I have in /DB-Web.

Any help on this so that I can place the index.html file in my root directory will be appreciated.

Thanks,

R.
 
Old 07-05-2015, 09:16 PM   #2
fshah
Member
 
Registered: Apr 2013
Posts: 45

Rep: Reputation: 0
You should have to change the default directory for storing web pages from below

the following line from /etc/apache2/sites-available/000-default.conf file (sudo nano /etc/apache2/sites-available/000-default.conf)

DocumentRoot /var/www/html

to

DocumentRoot root /DB-Web/

After this you should have to restart apache to take the changes you made using below command

sudo service apache2 restart

Thanks

Last edited by fshah; 07-05-2015 at 09:18 PM. Reason: Made mistake while posting
 
Old 07-06-2015, 05:05 AM   #3
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Take a look
http://www.unixmen.com/setup-virtual...ntu-14-04-lts/
 
  


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.2 Virtual Hosts won't serve index.html lspiehler Linux - Server 4 08-11-2011 04:27 AM
apache index.html doesn't show up but index.php do zoffmann Linux - Server 5 01-28-2008 03:53 PM
Where to put index.php (or index.html) on Slackware 11.0 moonguide Slackware 3 05-08-2007 06:35 PM
Index pages for virtual hosts dienerk Linux - General 1 10-22-2004 12:44 PM
Virtual Hosts/Directory Index Forbidden by Rule Alan Powell Linux - Newbie 4 04-26-2004 06:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:26 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
Open Source Consulting | Domain Registration