• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Changing localization of subdomains

A

Athlan

Guest
Hi, this is my first post, so I say "Hello" :)

I have a question about pathes to subdomains. Default index of subdomain there is in:
/var/www/vhosts/DOMAIN/subdomains/SUBDOMAIN/httpdocs/

I want to change this path. I have to change configuration in:
/var/www/vhosts/conf/httpd.include

How can I change default path to subdomains to:
/var/www/vhosts/DOMAIN/
(main directory)

Thank you for all answers :)
 
Originally posted by Athlan
I want to change this path. I have to change configuration in:
/var/www/vhosts/conf/httpd.include
You should not modify httpd.include. If you read at the very top of that file, you'll see the warning. Instead use a vhost.conf and vhost_ssl.conf for making custom alterations.
Originally posted by Athlan
How can I change default path to subdomains to:
/var/www/vhosts/DOMAIN/
(main directory)
I think you meant to create a path /var/www/vhosts/DOMAIN/SUBDOMAIN ?? The other way will create conflicts since subdomains are assigned their own set of directories, stats, conf files, etc. using similar names. I believe Plesk arranges subdomains as such, so that each subdomain can exist separately and neatly. Keep in mind security permissions and access in the defining scheme. Fighting this configuration will be more trouble than it's worth. If it's possible at all in a Plesk environment.
 
Re: Re: Changing localization of subdomains

Originally posted by lib99
You should not modify httpd.include. If you read at the very top of that file, you'll see the warning. Instead use a vhost.conf and vhost_ssl.conf for making custom alterations.

But I have to make wildcard form my domain, i'll try this tommorow:

Code:
<VirtualHost 62.75.150.15:80>
	ServerName   coje.pl:80
	ServerAlias  [url]www.coje.pl[/url]
	UseCanonicalName Off
	ServerAdmin  "[email protected]"
	DocumentRoot /var/www/vhosts/coje.pl/httpdocs
	CustomLog  /var/www/vhosts/coje.pl/statistics/logs/access_log plesklog
	ErrorLog  /var/www/vhosts/coje.pl/statistics/logs/error_log
<IfModule mod_userdir.c>
	UserDir /var/www/vhosts/coje.pl/web_users
</IfModule>
	<IfModule mod_ssl.c>
		SSLEngine off
	</IfModule>
	<Directory /var/www/vhosts/coje.pl/httpdocs>
	<IfModule mod_php4.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/coje.pl/httpdocs:/tmp"
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/coje.pl/httpdocs:/tmp"
	</IfModule>
		Options -Includes -ExecCGI
	</Directory>
</VirtualHost>

<VirtualHost 62.75.150.15:80>
	ServerName   *.coje.pl:80
	ServerAdmin  "[email protected]"
	DocumentRoot /var/www/vhosts/coje.pl/httpdocs
	CustomLog  /var/www/vhosts/coje.pl/statistics/logs/access_log plesklog
	ErrorLog  /var/www/vhosts/coje.pl/statistics/logs/error_log
	<IfModule mod_ssl.c>
		SSLEngine off
	</IfModule>
	<Directory  /var/www/vhosts/coje.pl/subdomains/bajki/httpdocs>
	<IfModule mod_php4.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/coje.pl/httpdocs:/tmp"
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/coje.pl/httpdocs:/tmp"
	</IfModule>
		Options -Includes -ExecCGI
	</Directory>
</VirtualHost>

Or

Code:
<VirtualHost 62.75.150.15:80>
	ServerName   coje.pl:80
	ServerAlias  *.coje.pl
	UseCanonicalName Off
	ServerAdmin  "[email protected]"
	DocumentRoot /var/www/vhosts/coje.pl/httpdocs
	CustomLog  /var/www/vhosts/coje.pl/statistics/logs/access_log plesklog
	ErrorLog  /var/www/vhosts/coje.pl/statistics/logs/error_log
<IfModule mod_userdir.c>
	UserDir /var/www/vhosts/coje.pl/web_users
</IfModule>
	<IfModule mod_ssl.c>
		SSLEngine off
	</IfModule>
	<Directory /var/www/vhosts/coje.pl/httpdocs>
	<IfModule mod_php4.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/coje.pl/httpdocs:/tmp"
	</IfModule>
	<IfModule mod_php5.c>
		php_admin_flag engine on
		php_admin_flag safe_mode on
		php_admin_value open_basedir "/var/www/vhosts/coje.pl/httpdocs:/tmp"
	</IfModule>
		Options -Includes -ExecCGI
	</Directory>
</VirtualHost>
 
It works, but file httpd.include always rewrites to default contents after about 5 minutes :/

How can i stop auto-overwrite this file?
 
Back
Top