• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

VPS configuration - chost.conf, .htaccess, domains

kalifsoup

New Pleskian
Hi,
I put the first steps with configuring VPS .
CentOS 6
Plesk Panel 11.5

Sorry for my bad english.

I have a couple of connected domains and subdomains to Plesk.
I'm using one webspace (all domains connected under one Webspace - named below 'hostdomain').

I changed a little bit in order of catalogs. All pages that I have, I placed in in httpdocs:

/var/www/vhosts/hostdomain/httpdocs/mypages/domain0
/var/www/vhosts/hostdomain/httpdocs/clientspages/domain1
/var/www/vhosts/hostdomain/httpdocs/clientspages/domain2
/var/www/vhosts/hostdomain/httpdocs/clientspages/subdomain1
/var/www/vhosts/hostdomain/httpdocs/clientspages/subdomain2
etc.

I connected domains/subdomains with those catalogs and everything works. I have a problem with vhost.conf for each domain...:

In /var/www/vhosts/system Plesk created all domains and subdomains that I use. I don't want use .htaccess, so I put directive e.g for domain1 in /var/www/vhosts/system/domain1/conf/vhost.conf

Directive in vhost.conf for the domain did not work. Zero reaction.

For example, if i set the .htaccess in /var/www/vhosts/hostdomain/httpdocs/clientspages/domain1 with ' Options + Indexes ' it works. But if I want set the same in /var/www/vhosts/system/domain1/conf /vhost.conf is no reaction.

What could be the reason?

1. Is it a problem that I put pages in httpdocs that belong only to domains from path - 'var/www/vhost/HOSTDOMAIN? And each domain that I have, have to be put in separately directory - /var/www/vhosts/each-domains-should-be-here/ ?

2. I have a feeling that it works like /var/www/vhosts/system/domainname/conf/vhost.conf corresponds only to what is in /var/www/vhosts/domainname/httpdocs/ ?

3. Is it correct to put invidual pages under one webspace (hostdomain) in httpdocs? I read in manuals that this directory (httpdocs) is for domain that is in the path...

How it work?
 
Last edited:
3. Is it correct to put invidual pages under one webspace (hostdomain) in httpdocs? I read in manuals that this directory (httpdocs) is for domain that is in the path...

Why do you put them in another domain's httpdocs ? Much has it works, it's not good especially security wise ..Just put all your domains in there own folders in the root "/" and not in "/httpdocs/"
 
I put all pages in one directory (httpdocs) for my comfort. I'm a webdeveloper. I have few portals and a lot of clients pages on my server. I still jumping from one catalog to another so very important to me is have all clear and in one place (one FTP and one root folder with clear dir names structure). Less clicks - faster work :)

You mean that httpdocs is for only one domains and this is the reason why vhost.conf won't work for my domains placed therein?
vhost.conf run by path name, not by domain configuration (doimain connected to folder)?
 
Last edited:
Back
Top