LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-14-2015, 11:46 AM   #1
selvapandian
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Rep: Reputation: Disabled
multisite host in apache on ubuntu14.04


platform:
os:ubuntu14.04 server x64
weserver: Apache/2.4.10 (Ubuntu) & PHP Version 5.5.12-2ubuntu4.1

i have web sites site1(html) & site2(php) i want access both site via same IP.
like www.<ipaddress>/site1/index.html & www.<ipaddress>/site2/index.php

below my configuration:

root dir: /var/www/websites/site1/index.html
root dir: /var/www/websites/site2/index.php

---------------------------------

access given to root dir: /var/www/websites/

----\site-available\site1.config
<VirtualHost *:80>

ServerAdmin webmaster@localhost

DocumentRoot /var/www/websites/site1/
</VirtualHost>


----\site-available\site2.config

<VirtualHost *:80>

ServerAdmin webmaster@localhost

DocumentRoot /var/www/websites/site2/
</VirtualHost>

>a2ensite site1.config
>a2ensite site2.config


error: could not web page on server
 
Old 01-14-2015, 01:17 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
You have DocumentRoot = "/var/www/websites/site1/" & "/var/www/websites/site2/".
So when you try "www.<ipaddress>/site1/index.html" apache tries to go to "/var/www/websites/site1/site1/index.html".
Simply remove the site1 / site2 from DocumentRoot, then it should work.
 
1 members found this post helpful.
Old 01-15-2015, 06:16 PM   #3
selvapandian
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
thanks pingu it's working.

i want to know basic of Apache
working refer any document or books.
 
  


Reply

Tags
apache 2.4.2, ubuntu 14.04, virtualhost



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
firefox28 in ubuntu14.04lts? ivtec Ubuntu 4 05-14-2014 11:57 AM
LXer: How to install WordPress Multisite on Centos VPS with Apache LXer Syndicated Linux News 0 11-20-2013 04:01 AM
Wordpress multisite rewrite rules vv22 Linux - Server 0 10-26-2012 02:06 AM
LXer: Multisite CVS Drupal Installation on Ubuntu LXer Syndicated Linux News 0 08-08-2007 04:01 PM
Multisite Domain with Samba PDC richard.dunn Linux - Software 0 08-31-2004 12:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:19 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