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

Change the DocumentRoot to a domain

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by CesarV, Jan 13, 2010.

  1. CesarV

    CesarV Guest

    0
     
    How do I get a domain eg domain.com opens the same folder from another domain?

    Do I create the file vhost.conf? What lines should contain this file?

    When I run the command / usr / local / psa / admin / sbin / websrvmng - reconfigure-vhost - vhost-name = <domain_name>, is re-created the file httpd.include.

    Is there another way to do?

    Thanks.
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,534
    Likes Received:
    1,239
    Location:
    Novosibirsk, Russia
    Affiliate:
    https://plesk.com/?a_aid=59ae552b0731c
    Why you can't use Domain Alias for this purpose?
     
  3. CesarV

    CesarV Guest

    0
     
    Morning IgorG. Thanks for all your help.

    I'll explain better. My client has multiple domains. When someone tries to access www.docolfaucets.com,
    this site will load content from another domain docol.com.br, which is the default domain of the client,
    where all content is centered.

    In my old server, the domain docol.com.br was set to open the DocumentRoot /var/www/vhosts/docol.com.br
    and the domain docolfaucets.com was set to open the DocumentRoot /var/www/vhosts/docol.com.br/ingles.

    If I use the forwarding option to redirect to another destination, content to the domain docolfaucets.com
    not work correctly because this area has some applications and forwarding mode does not work.

    Example configuration of my old server:

    #<docol.com.br>
    <VirtualHost 200.215.98.2>
    DocumentRoot /var/www/dominios/docol
    ServerName www.docol.com.br
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
    ErrorLog logs/docol-info-error.log
    CustomLog logs/docol-info-access.log combined
    </VirtualHost>
    #</docol.com.br>

    #<docol.com.br>
    <VirtualHost 200.215.98.2>
    DocumentRoot /var/www/dominios/docol/ingles
    ServerName www.docol.com.br
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
    ErrorLog logs/docol-info-error.log
    CustomLog logs/docol-info-access.log combined
    </VirtualHost>
    #</docol.com.br>

    Thus it is simple to set up multiple domains and point them to the same destination or to specific folders
    of the same DocumentRoot.

    Is there another way to do?
     
  4. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    i think it is cause we still not can handle e-mail addresses of an domain alias separately !
     
  5. CesarV

    CesarV Guest

    0
     
    Thanks IgorG for all the answers to my questions.

    I did the following configuration in Apache's httpd.conf to try to solve my problem:

    I included the line Include vhosts.d/clientes.conf before Include conf.d/*.conf and I created the file
    clientes.conf with the information:

    # <docolfaucets.com>
    <VirtualHost 187.61.7.99:80>
    ServerName www.docolfaucets.com
    ServerAlias docolfaucets.com
    UseCanonicalName Off
    SuexecUserGroup ftpdocol psacln
    DocumentRoot /home/httpd/vhosts/docol.com.br/httpdocs
    DirectoryIndex index.html index.htm index.php
    CustomLog /home/httpd/vhosts/docolfaucets.com/statistics/logs/access_log plesklog
    ErrorLog /home/httpd/vhosts/docolfaucets.com/statistics/logs/error_log
    </VirtualHost>
    # </docolfaucets.com>

    # <docolgriferias.com>
    <VirtualHost 187.61.7.99:80>
    ServerName www.docolgriferias.com
    ServerAlias docolgriferias.com
    UseCanonicalName Off
    SuexecUserGroup ftpdocol psacln
    DocumentRoot /home/httpd/vhosts/docol.com.br/ httpdocs
    DirectoryIndex index.html index.htm index.php
    CustomLog /home/httpd/vhosts/docolgriferias.com/statistics/logs/access_log plesklog
    ErrorLog /home/httpd/vhosts/docolgriferias.com/statistics/logs/error_log
    </VirtualHost>
    # </docolgriferias.com>


    I restarted apache and it worked perfectly. Now he was creating other fields and restarted the apache and
    the domains that were running as mentioned stopped working. When I try to access this domains the browser
    asks if I want to download index.php.

    Other thing. I created FTP accounts as the link above, but when I try to download a file via browser says
    you do not have permission to access this document.



    How can I solve the problem of apache? What is the best way?
     
  6. CesarV

    CesarV Guest

    0
     
    Even DocumentRoot for 2 domains

    I need that 2 domains open the same DocumentRoot. The problem of using aliases Domains is that the redirected domain is the name of the target domain, that is, when I access the domain www.domain1.com will load and lead to www.domain.com.

    There must be some way to do this. Please, I need to resolve this problem.

    Thank you.
     
  7. CesarV

    CesarV Guest

    0
     
    Help me, please!

    Good afternoon Igor. There must be some way to configure the same DocumentRoot for more than one domain. I always used this way, it is a facility that Apache has. Domains must be individually, without translating the domain name to another.

    I really need a solution. It is very important to me. What can I do?

    Please. Thank you.
     
  8. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,534
    Likes Received:
    1,239
    Location:
    Novosibirsk, Russia
    Affiliate:
    https://plesk.com/?a_aid=59ae552b0731c
Loading...