Subdomains With Vhost.conf

Sep 15, 2008

I'm trying to accomplish a redirect (or rewrite) of [url]to [url]

* I got DNS *.domain.com correctly pointing to my server.
* I also created a vhost.conf inside /var/www/vhosts/domain.com/conf, and Plesk (/var/www/vhosts/domain.com/conf/httpd.include) is correctly including the file.
* even though I don't know if it's needed or not, I created in Plesk a new CNAME with value *.domain.com pointing to domain.com

in my vhost.conf I got:

ServerAlias *.domain.com
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteCond %{HTTP_HOST} ^([^.]+).domain.com
RewriteRule (.*) /temp/%1/$1 [L]

when I try whatever.domain.com, I'm getting a 500 Internal Server Error.

View 1 Replies


ADVERTISEMENT

Using Vhost.conf To Override Suexec Directive In Httpd.include

Oct 20, 2009

I need to change the server configuration on Plesk such that the SuexecUserGroup directive is removed, so the user's cgi scripts run as the apache user (www-data), rather than as the user specified in that directive (the domain user), as on an unshared (non-VPS) server. I don't care about security from other domains because only one domain runs on it anyway, so making the user domain-specific is irrelevant from a security point of view and stops some of the user's code working.

This directive is found in
/var/www/vhosts/domainname.com/conf/httpd.include
and is:
SuexecUserGroup user psacln
(this line appears twice, for ports 443 and 80)

I understand that this file can't be modified, as it may be overwritten by Plesk. Therefore additional directives must go in the vhost.conf file.

Will the following vhost.conf file do the trick and override the directives in httpd.include?

<VirtualHost domainIP:443>
SuexecUserGroup www-data www-data
</VirtualHost>
<VirtualHost domainIP:80>
SuexecUserGroup www-data www-data
</VirtualHost>

View 1 Replies View Related

DNS Issues Rndc.conf & Named.conf

Apr 8, 2009

It started with this error:

Bind reloading on server01 using rndc zone: [ns1.mydomain.net]
Error reloading bind on server01: rndc: connect failed: 127.0.0.1#953: connection refused

so i did the obvious checked the csf firewall to see if port 953 was enabled and it was

so i took a look at rndc.conf

Code:
root@server01 [~]# nano /etc/rndc.conf
#start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "KLGSBmWZrev0I4fR4Tm4GXxdcYSTFzF23b1f9is1M=";
};

options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};
# End of rndc.conf

# Use with the following in named.conf, adjusting the allow list as needed:
#key "rndc-key" {
# algorithm hmac-md5;
# secret "KLGSBmWZrev0I4fR4Tm4GXxdcYSTFzF23b1f9is1M=";
#};
#
# controls {
# inet 127.0.0.1 port 953
# allow { 127.0.0.1; } keys { "rndc-key"; };
# };
# End of named.conf
Then i took a look at named.conf

Code:
options {
/* make named use port 53 for the source of all queries, to allow
* firewalls to block all ports except 53:
*/

//query-source port 53;

/* We no longer enable this by default as the dns posion exploit
has forced many providers to open up their firewalls a bit */

// Put files that named is allowed to write in the data/ directory:
directory "/var/named"; // the default
pid-file "/var/run/named/named.pid";
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
/* memstatistics-file "data/named_mem_stats.txt"; */
};

logging {
/* If you want to enable debugging, eg. using the 'rndc trace' command,
* named will try to write the 'named.run' file in the $directory (/var/named").
* By default, SELinux policy does not allow named to modify the /var/named" directory,
* so put the default debug log file in data/ :
*/
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

// All BIND 9 zones are in a "view", which allow different zones to be served
// to different types of client addresses, and for options to be set for groups
// of zones.
//
// By default, if named.conf contains no "view" clauses, all zones are in the
// "default" view, which matches all clients.
//
// If named.conf contains any "view" clause, then all zones MUST be in a view;
// so it is recommended to start off using views to avoid having to restructure
// your configuration files in the future.

view "localhost_resolver" {
/* This view sets up named to be a localhost resolver ( caching only nameserver ).
* If all you want is a caching-only nameserver, then you need only define this view:
*/
match-clients { 127.0.0.0/24; };
match-destinations { localhost; };
recursion yes;

zone "." IN {
type hint;
file "/var/named/named.ca";
};

/* these are zones that contain definitions for all the localhost
* names and addresses, as recommended in RFC1912 - these names should
* ONLY be served to localhost clients:
*/
include "/var/named/named.rfc1912.zones";
};

View 5 Replies View Related

Wildcard DNS Subdomains Working, But Existing Subdomains Not

May 7, 2007

I've set up the affiliate manager from jrox.com for a client of mine. This includes the setup of wildcard DNS so that each affiliate can have username.clientssite.com and have it count their clicks - which works properly.

What isn't working properly is that he also has forums.hissite.com, which is loading the main website page instead of his forums. He is using cpanel to add the subdomain, and it isn't failing, so I'm not sure what's going on with it.

Here is the relative section from the httpd file.

Quote:

<VirtualHost 74.53.106.146>
ServerAlias residualvictory.com
ServerAlias *.residualvictory.com
ServerAdmin webmaster@residualvictory.com
DocumentRoot /home/residual/public_html
BytesLog domlogs/residualvictory.com-bytes_log
ServerName www.residualvictory.com

User residual
Group residual
CustomLog /usr/local/apache/domlogs/residualvictory.com combined
ScriptAlias /cgi-bin/ /home/residual/public_html/cgi-bin/
</VirtualHost>

<VirtualHost 74.53.106.146>
ServerAlias www.forums.residualvictory.com
ServerAlias forums.residualvictory.com
ServerAdmin webmaster@forums.residualvictory.com
DocumentRoot /home/residual/public_html/forums
BytesLog domlogs/forums.residualvictory.com-bytes_log
ServerName forums.residualvictory.com

User residual
Group residual
CustomLog /usr/local/apache/domlogs/forums.residualvictory.com combined
ScriptAlias /cgi-bin/ /home/residual/public_html/forums/cgi-bin/
</VirtualHost>

And the bind file for his domain

Quote:

; Modified by Web Host Manager
; Zone File for residualvictory.com
$TTL 14400
@ 86400 IN SOA ns1.lucidic.com. root.lucid.lucidic.com. (
2007050705
86400
7200
3600000
86400
)

residualvictory.com. 86400 IN NS ns1.lucidic.com.
residualvictory.com. 86400 IN NS ns2.lucidic.com.


residualvictory.com. 14400 IN A 74.53.106.146

localhost.residualvictory.com. 14400 IN A 127.0.0.1

residualvictory.com. 14400 IN MX 0 residualvictory.com.

mail 14400 IN CNAME residualvictory.com.
www 14400 IN CNAME residualvictory.com.
ftp 14400 IN A 74.53.106.146
forums 14400 IN A 74.53.106.146
www.forums 14400 IN A 74.53.106.146
* 14400 IN A 74.53.106.146

View 10 Replies View Related

Vhost / Cirtex. My Opinion.

Mar 5, 2009

These guys are atrocious.

So far:

1)I bought a vps from them, got it promptly, except it was set to the wrong port.

2)I requested it reinstalled without there 'extras' so my network admin could do it himself. They do not offer a reboot in there power panel.

3)They reinstalled it, but changed my root password, also it is still set to the wrong port.

4)I then spoke to there live support, they started talking then disappeared for about 10 minutes to chat on the phone without even telling me, leaving a paying customer sitting there thinking 'what the hell'.

5)I requested the VPS be set to my original password by email, and they haven't
I just wanted a clean VPS to do my have my own install done on... how was that so much to ask of them?

I have now sent in another password request, but my advice to you all, steer the hell away!

View 13 Replies View Related

How To Setup A Vhost For Psybnc

May 20, 2009

How i can setup a new vhost for psybnc?

(i know how to add a vhost in psybnc, /bvhost [url]... but how i can setu this vhostname?

View 1 Replies View Related

Specific PHP Version For Vhost On Vps

Feb 7, 2008

I'm currently hosted on a friends VPS, and he has been good enough to give me his root access account details so I can mess with things if I need to. Good thing he has, too... Because I'm about to need to really mess with some things.

I've hit a brick wall, however.

The VPS is currently running php 4.3, but the CMS software that I am going to use to run my site requires PHP 5. Now, I don't want to arbitrarily update to php5 across the whole VPS, cause I dont know if thats going to knock out scripts on other vhosts. I read about the "run php5 as cgi" thing, but that doesnt really work for me, as the cms I am using has some quite in-depth url rewriting going on, and I dont want to have to make all of the php files for it end with .php5, in case that screws something up.

So, in my research, I came accross this:

wiki.apache.org/httpd/PHP4AndPHP5

The article on the apache wiki refers to a way of setting up a private server, or a VPS in this case, so that an individual vhost will use php5 as opposed to the default php4. "Great", I think... But then after loggin in to the shell and downloading the php-5.2.5 binary, I realised I dont have the first clue how I can install this, without it conflicting with the current PHP4 install, and so that it pick up on things like mySQL, and all the other libraries (gd, libxslt etc).

So, I guess my question is, does anyone know how I can accomplish this? I'm sorry if this isnt the right forum, I put it in the place that made most sense to me... Any help would be gratefully received, as I'm completely dumbfounded right now!

View 2 Replies View Related

Apache :: Set Up SSL (vhost) For Mailman

Jun 18, 2015

we are going to setup SSL on a server which host mailman (and the Webgui).

It's a SLES11 system and we configured a vhost with ssl. How do we have to combine the vhost and the mailman config?

View 11 Replies View Related

Plesk 11.x / Linux :: PHP Not Loading For One Vhost

Feb 19, 2015

We have strange problem with our plesk 11.0.9 Update #62.

Have only 10 domains hosted and all except 1 is working fine.... This particular domain doesn't run PHP scripts at all and when we try to browse a php script from browser, the file starts downloading. I have tried to compare the php settings from other working vhosts but and found no change at all... tried with

/usr/local/psa/admin/bin/httpdmng --reconfigure-domain domainname-tld

/usr/local/psa/admin/bin/httpdmng --reconfigure-al

Also tried to create the vhost but no gain...

Also I tried to change the PHP setting from control panel so that the php file would be generated , but every time I reset the value, it reverts back and no value is preserved.

View 1 Replies View Related

Webmail Roundcube Apache SSL Per Vhost

Mar 9, 2015

I have more than 1 domain on my VServer and roundcube and all of its templates only allow me to modify webmail.domain.tld...so I can setup 1 website correctly but all the rest will have the wrong SSL cert.How can I setup different ssl cert for Webmail with Apache as Webserver and roundcube as webmailer? I think I should modify the vhost confs of roundcube into /etc/apache2/plesk.conf.d/webmails/roundcube/ but I did not find a working solution.

View 1 Replies View Related

Plesk 12.x / Linux :: CLI Vhost Setup Example?

Nov 22, 2014

I have to move a lot of customers from old home-grown server setup to a plesk panel powered server.I want to use the CLI to do this and wondered if there was a tutorial showing how to setup the customer and add the subscription/hosting plan for that customer?

I looked over the docs and tested them, but the service plan never shows that hosting is added.

# ./customer --create JDoe -name "John Doe" -passwd sample -country US -notify false
# ./subscription --create example.com -owner admin -service-plan "Default Domain" -ip 192.168.1.100 -login JDoe -passwd "user pass"

I get the email saying that the do moan was setup, but the domain does not show that hosting is affiliated with it.

View 5 Replies View Related

Cpanel Apache Status Vhost (unavailable)

Jan 27, 2007

In Cpanel, If i click on Apache Status it tells me aload of website that have been visited recently, under the vhost column. It shows this but sometimes under those it shows aload of (unavailable). Why is this. Is this normal?

View 2 Replies View Related

Disable/Bypass Suexec Per Vhost Domain

Oct 12, 2007

I am running on;

Plesk versionpsa v8.0.1_build80060613.20 os_CentOS 4.2
Operating systemLinux 2.6.9-023stab033.6-smp
License key numberPLSK.00170782.0006

I need to be able to access cgi between vhost domains. In particular one frequently updated file located 'centrally' in the cgi-bin of one of the vhost domain.

I would like to be able to have other vhost domains be able to access this file but suexec won't let that happen. I have searched around and tried to following;

Created vhost.conf file in the conf directory of one of the domains.

The vhost.conf file contained (with no #):

# <IfModule mod_suexec.c>
# SuexecUserGroup userid psacln
# </IfModule>

I ran;

/usr/local/psa/admin/bin/websrvmng -u --vhost-name=<domain name>

Then reboot.

The result was all the vhosts stopped working. I reset the websvrmng, things returned to normal.

Then I tried updating the httpd.include file adding (with no #);

# <IfModule mod_suexec.c>
# SuexecUserGroup userid psacln
# </IfModule>

Then reboot.

The result was the same, all vhosts stopped working.

Does anyone have an idea how I can achieve this? I know I can disable suexec all together but that wreaked a little havoc with the cgi app when I tried that.

View 2 Replies View Related

Apache :: Internal Server Redirection Vhost

May 26, 2013

I have a Public [82.x.x.x] and Private Apache Servers [192.168.20.100], and wish to redirect a series of subdomain requests i.e. for joomla.example.com or moodle.example.com on 82.x.x.x => joomla.example.com or moodle.example.com on 192.168.20.100.

joomla.example.com [82.x.x.x] returns joomla.example.com [192.168.20.100]

moodle.example.com [82.x.x.x] however returns joomla.example.com [192.168.20.100]

VHOST Configuration on [82.x.x.x]:

<VirtualHost *:80>
ServerName joomla.example.com
RewriteEngine On
RewriteRule ^(.*)$ http://192.168.20.100$1 [P]
</VirtualHost>
<VirtualHost *:80>
ServerName moodle.example.com
RewriteEngine On
RewriteRule ^(.*)$ http://192.168.20.100$1 [P]
</VirtualHost>

----------

VHOST Configuration on [192.168.20.100]

<VirtualHost *:80>
# joomla.example.com>
ServerName joomla.example.com
ServerAlias joomla.example.com
DocumentRoot /var/www/joomla/
ServerRoot /var/www/joomla/
ScriptAlias /cgi-bin/ /var/www/~cgi-bin/joomla/
ErrorLog /var/www/~log/joomla/error.log
CustomLog /var/www/~log/joomla/access.log combined
ErrorDocument 404 /404.htm

[Code] ......

View 2 Replies View Related

Apache :: Multi VHost / Single File

Mar 20, 2015

I'm actually working on a project in wich one I use Zend Framework 2. In this project I have 4 websites. (this is require, I don't want to change it).

I have 1 Virtual Host for each website:

- com-mywebsite.com
- cp-mywebsite.com
- pos-mywebsite.com
- ap-mywebsite.com

Each Virtual Host redirect to the same folder and same file because everything is in the same project so same entry point (same index.php)

actually if I type each url in a browser, they all redirect to the same part of my project so I added some routes in ZF2 to access to one website and not another :

- com-mywebsite.com/com
- cp-mywebsite.com/cp
- pos-mywebsite.com/pos
- ap-mywebsite.com/ap

This is a quick and dirty fix because I also can access to the ap website with this url : com-mywebsite.com/ap

I'd like every website to be accessed from their root:

- com-mywebsite.com
- cp-mywebsite.com
- pos-mywebsite.com
- ap-mywebsite.com

And I don't want to display /something after it to access to the website even if after you can access to some other pages of each website.

View 1 Replies View Related

Plesk 12.x / Linux :: Host Template Only For One Vhost

Aug 13, 2014

edited /usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php and add this include hhvm.conf; and work but it's possible to edit this setting only for one vhosts? I must enable only for one vhost because i have some php script not work with hhvm

View 3 Replies View Related

Plesk 12.x / Linux :: Reconfigure Vhost Failed

May 22, 2015

I getting this error after I run the command: ~# /usr/local/psa/admin/bin/httpdmng --reconfigure-all

Code:

PHP Deprecated: Comments starting with '#' are deprecated in /opt/psa/admin/conf/php.ini on line 25 in Unknown on line 0
Error occured while sending feedback. HTTP code returned: 502
Error occured while sending feedback. HTTP code returned: 502
Execution failed.
Command: httpdmng
Arguments: Array

[Code] ....

3 sites on this server hosted with different subscriptions and conditions. So the host work yet but I getting a red banner on the Subscription menu.

About my system:

os: debian 7.8 64bit
plesk: 12.0.18 Update #47

View 1 Replies View Related

Plesk 11.x / Linux :: Permission Correctly In Vhost?

Nov 25, 2014

I have domainA and domainB. domainA hosting files, for security ALL browser access should denied.. EXCEPT domainB make in php call with readfile() to a file on domainA. This should allowed.

domainB => readfile(http://domainA/myfile) => allowed ... all other access should denied.

So I set in vhost of domainA this:

<DirectoryMatch "^/var/www/vhosts/domainA/httpdocs/folder/">
Order deny,allow
Deny from all
Allow from 127
Allow from server-ipv4
Allow from server-ipv6/128
Allow from ::1/128
</DirectoryMatch>Click to expand...

View 3 Replies View Related

Apache :: Every Path Is Forbidden After Enabling Wildcard Vhost

Aug 3, 2014

I've been developing websites using Apache on various Ubuntu laptops over the years. I just set up a new laptop with Apache and it worked fine. If I went to localhost in my browser then it showed the default page. So far, so good.

I then added a file to sites-available to add wildcard virtual hosts. This lets me use convenient urls while developing sites on my laptop. Once I enabled this site, every url that resolved to localhost became 403 Forbidden, including urls that should return 404. Here is an example entry from other_vhosts_access.log...

View 5 Replies View Related

Plesk 12.x / Linux :: 12.0.18 - How To Set Permissions To 770 By Default When Create Vhost

Oct 5, 2014

When a customer use the wordpress auto installation tool, all work ok.

But, when the customer try to install wordpress manually (Uploading by FTP), it returns different permissions errors.

Example: "wp-config.php" cant write .

I compared the permissions of both vhosts (WP-Auto-install and WP-Manually-Install), and have totally different permissions.

WP-Auto-installed : /httpdocs = 770
WP-Manually : /httpdocs = 750

How I can set permissions to 770 by default when create a vhost? to avoid the customer having to do it manually.

View 4 Replies View Related

Plesk 11.x / Linux :: Recreate Vhost System Directory?

Jul 13, 2015

My /var/www/vhosts/system directory was accidentally deleted. The actual vhost directories are unharmed, e.g. /var/www/vhosts/example.com. Is there a non-destructive script I can run to re-initialize the system directory? I am on Plesk 11.5.30.

View 2 Replies View Related

Plesk 12.x / Linux :: Moved Vhost Location - Some Sites Not Working

Nov 14, 2014

I have a new DS with Plesk 12. I needed to change the default /var/www/vhosts location to a different physical drive, with more capacity.The larger disk is mounted as /disk1, so I created a folder here called vhosts, moved everything from the existing /var/www/vhosts directory, then I mounted /disk1/vhosts as /var/www/vhosts. See my fstab output below.

I then edited /etc/psa/psa.conf to update the VHOSTS location as per [URL] ...., and restarted Apache, MySQL and reconfigured domains.I thought all was OK, and that Plesk would just see /var/www/vhosts as normal, but I proceeded to migrate domains from another server to this box, and found that whilst some sites were working OK, many were not.

I was finding that existing config directives that used <Directory> were being ignored or seemed to disappear.All sites with .htaccess files stopped workingWe would get Apache / PHP errors saying that files could not be accessed as they were not in the allowed path for the domain. Plesk seems to be logging, reporting, and handling files as if they were in /disk1/vhosts, not the usual location. I have got sites working by adding /var/www/vhosts/ domain and /disk1/vhosts/domain to the PHP Settings page as allowed paths.

I have checked in the httpd.conf for each domain, and they all list the site document root as /disk1/vhosts/domain, not /var/www/vhosts/domain.It's as if Plesk is ignoring the change in /etc/psa/psa.conf.

All I want is for Plesk to think that /var/www/vhosts is the document root for all domains, and not do anything with /disk1/vhosts. I have many sites with hard coded links to included files in /var/www/vhosts/domain, and I dont want to have to rewrite them all to use /disk1/vhosts.

I have had to stick HTTP configuration directives on nearly every site, and add these entries to the allowed paths box, which obviously I should not have to do. Can any Plesk / Linux gurus tell me what I need to do to fix my problem, get sites working in /var/www/vhosts, and have Plesk allow .htaccess files to work without me having to add "AllowOverride All" to every domains??

# /etc/fstab
# Created by anaconda on Tue Oct 14 05:22:57 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#

[code]....

View 2 Replies View Related

Plesk 12.x / Linux :: Advanced NginX Directives For Vhost (memcached)

Sep 19, 2014

You can edit the nginx directives for the desired vhost at the webserver config. However, it seems like that you can only add basic directives, but not something like that:

Code:

http {
# memcached servers
upstream memcached-servers {
server 127.0.0.1:11211;
}

[Code] ....

How can I do that?

View 4 Replies View Related

Plesk 11.x / Windows :: Reconfigure Vhost -> Missing Required Parameter

Jul 25, 2013

When i try to call websrvmng.exe --reconfigure-vhost --vhost-name=domain.com (like here: [URL] .....),

I get this message: "Missing required parameter --vhost-config."

Version: Plesk 11.5.30 Update#5

View 8 Replies View Related

Plesk 11.x / Windows :: Large Number Of Domains - Change Vhost Manually

Jul 9, 2014

I have somewhere at 2000 domains.

I need to change path to vhost from W:host to D:vhost

I copied all files from W to D drive and created symbollinks. Now all files stored in D:vhost and symbollincs pointing to W:vhost.

If I will use reconfigurator, will it recopy existing files or just will skip them? Because I have millions files in my vhost dir

Also i thought about change drive letter in windows OS. It wil be enough to just stop IIS service and plesk services for switching disk letter?

Can i just some how say plesk that he should search all vhost files in D:vhost? With out process of copying files,becouse thay already exist there are.

View 2 Replies View Related

Plesk 12.x / Linux :: Activating WebDAV In Specific Domain - No Vhost Directory

Jul 14, 2014

Want to activate webDAV in a specific domain with a v_host conf file, but do not have a /conf directory in the domain path. How can I manage the this?

View 2 Replies View Related

WHM Subdomains And DNS

Nov 8, 2009

I'm setting up an auto-configuration script to setup accounts in WHM and create subdomains and so far everything is working fine!

But we have a problem - when an account is setup and the subdomain is not working yet when a customer visits it he gets wrong dns information and then when the domain starts working it's not working for him.

I know that flushdns solves this issue under Windows but I don't want to make my newbie customers run complicated commands.

Will a 5 minut delay solve this issue from the moment the account is created to the moment the customer visists the site?

View 3 Replies View Related

Subdomains With WWW

Jun 13, 2008

my control panel is PLESK, when our customers create sub domain they cannot access to their sub domains with www, for example the sub domain is sub.domain.com and I cannot access to this sub domain whit this address www.sub.domain.com .

what should I do to work the sub domains with www ?

View 4 Replies View Related

SSL And Subdomains

Apr 27, 2008

I have a question about SSL certificates and how they function with subdomains.

OVERVIEW
Right now we have [url]. This subdomain houses our client management tool.

PROBLEM
We wanted to use an SSL cert on the above domain so I purchased a wildcard SSL. *.domain.com SSL was ordered and setup.

However, now when we enter[url]we're seeing the content from domain.com, not secure.domain.com

I understand we could use [url]but isn't the point of the wildcard SSL so I can do what I want... access [url]?

This is a cPanel/WHM setup.

View 9 Replies View Related

SSL And Subdomains

Jan 30, 2007

I have googled high and low and i'm about to explode. This has been an issue for the last 4 days...

I have secure.domain.com

I bought a SSL cert for secure.domain.com

I installed the cert

[url] shows the right content

[url]shows the content for [url]
-
I've had this working before on site5, but I share a dedicated account now with WHM/cPanel and it's not working.

it's like the subdomain is being ignored.
-
Tll me if i'm wrong, but each SSL needs its own IP correct? i added an IP for domain.com and WHM seems to have set it for all the subdomains as well.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved