1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

How do I ... add a Subdomain to the Domain?

Discussion in 'Plesk for Linux - 8.x and Older' started by ArthurDent, Mar 28, 2006.

  1. ArthurDent

    ArthurDent Guest

    0
     
    Hi!

    I've already searched the forum but haven't found an appropriate solution. My problem: I want to add a subdomain to my Domain like "de.domain.com" that IS the normal domain "domain.com".

    I don't want to forward to the domain with PHP or HTML, I don't want to "rewrite" it and I don't want an extra directory for it.

    Actually I just wanna tell Plesk, that "de.domain.com" and "domain.com" are the same.

    So, how do I do it?

    Any help is highly appreciated!

    Cheers
     
  2. Highland

    Highland Guest

    0
     
    Any particular reason why not? The easiest method of doing this is to use at least one file to bounce to the other. The alternative is to rewrite your Apache configuration files but this is easier said than done because Plesk rewrites many files
     
  3. ArthurDent

    ArthurDent Guest

    0
     
    Well, I want to use the subdomain to indicate the language. The website is written in php and should detect the language by the used subdomain.

    So a rewriting or forwarding isn't possible as the subdomain disappears and is replaced by the normal "www". I eventually use the Rewrite-Engine to do some rewriting for the parameters as well...

    If there isn't any other way, I'll simply add the subdomain in PLESK and symlink the httpdocs of the "domain.com" ...

    Thanks
     
  4. Highland

    Highland Guest

    0
     
    I was a bit hasty in my previous reply. Here's the downside to what you propose.

    When you make a subdomain in Plesk it overwrites the httpd.include file in your conf directory and adds an entry. It's in this entry that your home directory is set. I know that you can override settings in here by using vhost.conf but I don't think that the scope of vhost.conf encompasses base directory settings.

    What you can try is copying the VirtualHost block for your subdomain from that httpd.include file and pasting it into a conf file in your /etc/httpd/conf.d. Name it something starting with a z (like z-domain.conf). Then make your edits. Plesk won't overwrite this file and hopefully Apache, having read it last, will use its settings over the ones set by Plesk. Just be aware that this could break Apache so use it with caution.
     
  5. ArthurDent

    ArthurDent Guest

    0
     
    That's actually a nice idea, but I don't want to modify the server configuration that much. It'll be very hard to restore and remind it in case of a server crash (we're having a crash quite often). So I'd actually prefer a very simple and easy-to-restore/remind method.

    And actually it's a shame, that PLESK doesn't offer it. Sharing the same webspace should be the easiest thing for the server instead of creating special directories ...

    Anyway, thanks for your ideas :)
     
  6. Who-m3

    Who-m3 Guest

    0
     
    Utilizing the vhost.conf directive, along with "ServerAlias", you should be able to complete the task you're working with. You'll still need to create the DNS records within plesk, but the vhost.conf should do the rest (as for the site appearing). You should be able to parse the server_name through php to identify what server name they used to access the site (thus allowing you to modify the language settings, as you're wanting to do).

    As for the statement regarding you having crashes regularly..that's a serious issue. Anyone hosting any site knows that having an issue with continuous crashes of the system needs to be addressed. I'd suggest directing all of your attention towards your issues with stability and reliability before expanding in multiple directions with language supports...

    Edit: (For assistance with vhost.conf, please use the "Search" feature at the top of the Forums. The lines you will want to add to your configuration will be "ServerAlias de.server.com" etc.)
     
  7. ArthurDent

    ArthurDent Guest

    0
     
    Hi!

    Thanks for your tip. I've already tried to work with the vhost.conf and actually set up the ServerAlias but didn't specify the DNS via PLESK. I'll try it :)

    Regarding the server issue: we're working on it :)

    Thanks and Cheers,
    chris
     
  8. ArthurDent

    ArthurDent Guest

    0
     
    How do I exactly do it? I've just specified the DNS and it shows up like
    de.domain.com. CNAME domain.com

    But it doesn't work ... de.domain.com just shows the PLESK "domain not found" default page ...

    I'm not an Admin so I'm not sure whether I did it right. The vhost.conf just contains the following line:
    ServerAlias de.domain.com

    Is this right?

    Hope, you can help me!

    Cheerio
     
Loading...