• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

create a virtual host on my plesk (centos)

Pecnet

Basic Pleskian
Hello,

I try to add my 2 directive in configuration -> vhost.conf

and I see that it does not work,

can you tell me if I can add 2 servername in the same file -> vhost.conf?

=>


<VirtualHost *:80>

ServerName blog.site.be
DocumentRoot /var/www/vhosts/site.com/httpdocs/blog
<Directory /var/www/vhosts/site.com/httpdocs/blog>
allow from all
Options +Indexes
</Directory>

</VirtualHost>

<VirtualHost *:80>

ServerName wiki.site.be
DocumentRoot /var/www/vhosts/site.com/httpdocs/wiki
<Directory /var/www/vhosts/site.com/httpdocs/wiki>
allow from all
Options +Indexes
</Directory>

</VirtualHost>




Thank you
 
Last edited:
Hi Pecnet,

Why don't you add a new subdomain via your Plesk admin panel instead of trying to manually create vhost?
 
Hello,

thank you for your reply,
I've done as you said.

I think we can add all the directive on the primary domain
 
Hello,

I have looked at the link you shared.

But I still do not understand how to write more directive in the same file vhost.conf

otherwise if I create a subdomain at that time I can write for each sub domains directive

it works
 
Back
Top