1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

httpd.conf

Discussion in 'Apache' started by tandiono, Oct 5, 2005.

  1. #1
    Hi! how can i add a ServerAlias directive to httpd.conf? Thanks :)
     
    tandiono, Oct 5, 2005 IP
  2. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #2
    From my httpd.conf:

    
    
    <VirtualHost 205.177.1.2:80>
    ServerName blabla.com
    ServerAlias *.blabla.com
    RewriteEngine On
    RewriteRule     (.*)        http://www.blabla.com$1    [R=301,L]
    </VirtualHost>
    
    
    Code (markup):
     
    frankm, Oct 5, 2005 IP
  3. tandiono

    tandiono Well-Known Member

    Messages:
    353
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Hi! do I have to create a httpd.conf and then put in the code that u give me and upload it unto /www directory? sorry as im not very familliar with this stuff :)
     
    tandiono, Oct 5, 2005 IP
  4. johnt

    johnt Peon

    Messages:
    178
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #4
    We put
    Include /path/to/virtual/host/directory
    Code (markup):
    into httpd.conf and then in that directory we have a file for each virtual host in the format that frankm posted
     
    johnt, Oct 5, 2005 IP
  5. tandiono

    tandiono Well-Known Member

    Messages:
    353
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #5
    Hi! on which directory? im on cpanel, it seems that i can't find it.. Please advice me.. Thanks :)
     
    tandiono, Oct 5, 2005 IP
  6. tandiono

    tandiono Well-Known Member

    Messages:
    353
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #6
    Bump... Anyone please help me. Thanks
     
    tandiono, Oct 9, 2005 IP
  7. johnt

    johnt Peon

    Messages:
    178
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I've never used cpanel, but you can use any directory that you have FTP access to. Any time you want to add a new virtual host, just upload a new file and tell Apache to reload its config files.
     
    johnt, Oct 9, 2005 IP