Welcome, Guest. Please login or register.
April 24, 2014, 00:50:12 AM
Home Help Search Calendar Login Register
Show unread posts since last visit.
News: Let Pardus-Anka become #1: Pardus-Anka Bug ReportPardus-Anka World Google+ | The Pardus wiki  | Visit Pardus-Anka official website  | Register as forum member?  Email the moderator!

+  Pardus Worldforum
|-+  Assistance
| |-+  Pardus for beginners
| | |-+  Apache Server
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Apache Server  (Read 1517 times)
DANHO
Pardus Master
***
Gender: Male
Posts: 187


Pardus SF


View Profile
« on: October 14, 2007, 06:22:26 AM »

How do i configure virtualhost to serve two domain names?
Is it vhost.conf or httpd.conf?
« Last Edit: October 14, 2007, 06:24:19 AM by DANHO » Logged
Eren.Turkay
Global Moderator
Pardus Master
*****
Posts: 262



View Profile WWW
« Reply #1 on: October 14, 2007, 07:01:02 AM »

It's /etc/apache2/vhosts.d directory. You see "00_default_vhost.conf", that's Pardus default configuration. You can create how many you want files in vhosts.d, apache will load everything in this directory alternately.

E.g. if you create 01_myvhost and 05_other_vhost, apache will load 01_myvhost first and then 05..
Logged
DANHO
Pardus Master
***
Gender: Male
Posts: 187


Pardus SF


View Profile
« Reply #2 on: October 14, 2007, 08:14:05 AM »

Thanks for guiding me to the vhosts.d directory Eren.

 I removed 00_default

Can someone show me a copy of a configured vhost.conf file so that I may learn to configure mines?  A mock-up? Anyone?

Where do i direct error log?

Must custom log be enabled?

This is the Beginners division of Pardus World Forum,,right? Huh?


« Last Edit: November 02, 2007, 00:58:17 AM by DANHO » Logged
DANHO
Pardus Master
***
Gender: Male
Posts: 187


Pardus SF


View Profile
« Reply #3 on: November 02, 2007, 01:16:18 AM »

  Im trying this dns service demo(from www.dnsexit.com) This service attaches and directs my  registered domain name to my dynamic ip address and updates it when or if it changes.

Does the dns server package in Pardus do this?

Right now Im having trouble getting 2nd server to run on 02_sb_vhosts. stonecuban.com (01_stone_vhost) is running. Im having trouble configuring 02_sb_vhost.(a second domain name)

Can someone give me a basic idea of what 02_sb_vhost.conf should look like.
I'm trying to virtualhost a second domain name?
« Last Edit: November 10, 2007, 01:35:07 AM by DANHO » Logged
DANHO
Pardus Master
***
Gender: Male
Posts: 187


Pardus SF


View Profile
« Reply #4 on: November 10, 2007, 01:51:16 AM »

After 3 weeks of brain freeze, I was able to figure out a basic configuration for vhost.conf files.
This is just a"BASIC" setup practice to be able to run more than one server using apache's name base virtualhost.

01_server1_vhost.conf

NameVirtualHost *:80

<VirtualHost *:80>   --------------------------------------> Apache listens to all request on port :80
ServerAdmin nobody@nohoo.com
DocumentRoot /var/www/localhost/server1 folder
ServerName www.server1.com  -------------------------------------->     "www".server1.com
ErrorLog /var/www/localhost/server1 folder/-error_log
CustomLog /var/www/localhost/server1 folder/-access_log common
</VirtualHost>

Options Indexes FollowSymLinks
-------------------------------
02_server1.com_vhost.conf

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin nobody@nohoo.com
DocumentRoot /var/www/localhost/server1 folder
ServerName server1.com                ----------------------------------> server1.com
ErrorLog /var/www/localhost/server1 folder/-error_log
CustomLog /var/www/localhost/server1 folder/-access_log common
</VirtualHost>

Options Indexes FollowSymLinks
-------------------------------
03_server2_vhost.conf

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin nobody@nohoo.com
DocumentRoot /var/www/localhost/server2 folder
ServerName www.server2.com             --------------------------------> "www".server2.com
ErrorLog /var/www/localhost/server2 folder/-error_log
CustomLog /var/www/localhost/server2 folder/-access_log common
</VirtualHost>

Options Indexes FollowSymLinks
-------------------------------
04_server2.com_vhost.conf

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin nobody@nohoo.com
DocumentRoot /var/www/localhost/server2 folder
ServerName server2.com              ----------------------------------->  server2.com
ErrorLog /var/www/localhost/server2 folder/-error_log
CustomLog /var/www/localhost/server2 folder/-access_log common
</VirtualHost>

Options Indexes FollowSymLinks

01 and 02 are the same server as is 03 and 04.
This way,,,server1 and server2 accepts request regardless if "www" is entered at beginning of domain name.
I had probs with that.

« Last Edit: November 12, 2007, 16:02:46 PM by DANHO » Logged
DANHO
Pardus Master
***
Gender: Male
Posts: 187


Pardus SF


View Profile
« Reply #5 on: November 11, 2007, 19:01:10 PM »

It seems to be running.

www.southbaymillworks.com
www.stonecuban.com
« Last Edit: November 12, 2007, 16:04:18 PM by DANHO » Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!