Please help me with ServerAlias and ServerName issues

Discussion in 'Apache' started by locals, Aug 30, 2009.

  1. #1
    I am trying to use wordpress mu on a godaddy shared hosting server, with subdomains and not sub folders.

    IT CAN BE DONE . . . i have actually accomplished it once, but it was with the help of godaddy, now they are avoiding the topic and I can remember how i did it.

    I have already set up the wild card in the dns and also created the subdomain in my control panel area HOW EVER

    when i go to THESUBDOMAIN.mywebsite.com

    i get a 403 error - possibly to do with the htaccess file.

    But my problem comes in because i have to edit ServerAlias and ServerName somewhere and i dont remember how or where i did it.


    when i add

    
    <VirtualHost dedicated ip>
    DocumentRoot /home/content/myinfo/html/myfolder
    ServerAlias *.mysite.com
    ServerName [url]www.mysite.com[/url]
    </VirtualHost>
    
    Code (markup):
    to my htaccess file

    
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    
    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule> 
    
    
    Code (markup):

    i get an internal server 500 error.

    So my question is WHERE DO I POSSIBLY EDIT or can apply please remember i am on shared hosting so i can not access the httpd.conf file

    ServerAlias *.mysite.com
    ServerName www.mysite.com

    please remember i am on shared hosting so i can not access the httpd.conf file




    THANKS SO MUCH FOR YOUR HELP !
     
    locals, Aug 30, 2009 IP
  2. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well first of all you can forget about adding any <VirtualHost> containers into a htaccess, it's not allowed. You'll most likely find how to use a htaccess to map subdomain requests to subfolders on the httpd wiki, that's about all you can do on shared hosting anyway.
     
    szalinski, Aug 30, 2009 IP
  3. locals

    locals Well-Known Member

    Messages:
    1,677
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    153
    #3
    thanks for your quick response. . . so i have heard a little about this domain mappping, how ever can you explain more . . . i would like something similar to:

    myblog.mysite.com

    to show up in the search engines. If i have to set everything up in a subfolder first then that is what I am willing to do but I would really like the subdomain to be shown in searches rather than the subfolder THANKS AGAIN !
     
    locals, Aug 30, 2009 IP