The MU forums have moved to WordPress.org

host file on pc to allow subdomain with wildcards?? (10 posts)

  1. DDT
    Member
    Posted 15 years ago #

    hi,

    As i am developing on a new server i am trying to test WPMU by editing host

    217.xx.xx.xxx mydomain.com
    217.xx.xx.xxx http://www.mydomain.com
    217.xx.xx.xxx testblog.mydomain.com
    217.xx.xx.xxx http://testblog.mydomain.com

    The first 2 redirects work. But my created testblog doesn't.

    testblog.mydomain.com/wp-activate.php?key=6166b05b5f0323a6
    gives a 404.

    How do i enable subdomains in host file???

  2. SteveAtty
    Member
    Posted 15 years ago #

    did you enable DNS wildcards on the server?

  3. DDT
    Member
    Posted 15 years ago #

    @steveAtty, yes i changed the dns for wildcards pointing to my new server.

    I have installed WPMU on a domain i am not seriously using at the moment. And even now i see
    -------------
    Not Found

    The requested URL /wp-activate.php was not found on this server.
    ------------------

    haven't changed .htaccess and this is a clean WPMU install.

  4. SteveAtty
    Member
    Posted 15 years ago #

    are you hosting more than one site on the server? Is the Apache server configured to support *.mydomain.com or is it just set up for domain.com and http://www.domain.com?

  5. DDT
    Member
    Posted 15 years ago #

    hmm, yes i am hosting more the one site on the server.

    Ah, the Apache part might be it. do you know how i can reach httpd.conf with plesk or putty?

    regards

  6. SteveAtty
    Member
    Posted 15 years ago #

    It might not be in the httpd.conf file,h if its Apache2 might be located in a directory called sites-available (which might be under /etc/apache2 but that depends on your server set up). In there there will be a file for each site.

    Or it could be in the httpd.conf in which case you are looking for the server alias in the VirualHost configuration

  7. DDT
    Member
    Posted 15 years ago #

    ok i see i have Apache Version Apache/2.2.3 (CentOS)

    domains are set up like
    /home/httpd/vhosts/<domain-name>

    i also see
    Virtual Directory Support disabled

    I am stuck with root access to change http.conf
    I have enabled SSH access but i get Permission denied for conf/ i must be login as root, but i don't know how.

    I mean it should be user: root password: adminpassword

  8. DDT
    Member
    Posted 15 years ago #

    @steveatty, how do i check if Apache is setup to support *.mydomain.com ?

  9. DDT
    Member
    Posted 15 years ago #

    hmm, finally found httpd.conf in etc/httpd/conf/httpd.conf but i get a permission denied when i simpley want to
    make a copy

    cp http.conf http.conf.bak

    can't i use htaccess for the ServerAlias *.domain.tld part

  10. DDT
    Member
    Posted 15 years ago #

    ok with locate httpd.conf you can see where it's located

    but i still can't copy http.conf

    i am readin http.conf with less http.conf and the virtual host part is commented, like

    # VirtualHost example:
    # Almost any Apache directive may go into a VirtualHost container.
    # The first VirtualHost section is used for requests without a known
    # server name.
    #
    #<VirtualHost *:80>
    # ServerAdmin webmaster@dummy-host.example.com
    # DocumentRoot /www/docs/dummy-host.example.com
    # ServerName dummy-host.example.com
    # ErrorLog logs/dummy-host.example.com-error_log
    # CustomLog logs/dummy-host.example.com-access_log common
    #</VirtualHost>

    Should i uncomment this part and add
    ServerAlias *.example.com

About this Topic