• 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

How can i fix webmail.mydomain and wildcard problem??

BarryD

New Pleskian
Hello,

I have a problem with the *.mydomain.com and webmail.mydomain.com. I have been able to swap atmail conf (see also: http://wordpress.org/support/topic/how-to-enable-exclude-webmaildomaincom-or-mdomaincom?replies=9)

The last part of httpd/conf.d looks like

ssl.conf
webalizer.conf
welcome.conf
zz001_atmail_vhost.conf
zz001_horde_vhost.conf
zz010_psa_httpd.conf

So now i can reach webmail.mydomain.com, but the problem is every non existing subdomain redirects to atmail (like asdfasf.mydomain.com ) i just want to show the 404 (or something else)

How can i fix this???

regards
 
hi,

tx for the link but it didn't work. I have added subdomains/zz-wildcard/conf/vhost.conf and restarted the server but a non existing subdomains still go to atmail

The httpd/conf.d part i have changed is on server root level so on level /var/ and http://kb.odin.com/en/2239 is no
/var/www/vhosts/... level could that be the problem??

Can the dns be a causing a problem?? In my situation i don't control the dns by plesk but through dns.myhostingprovider.com?
the dns values in plesk are
*.webmail.mydomain.com. CNAME mydomain.com.
xxx.xx.xx.xx / 24 PTR mydomain.com.
mydomain.com. NS ns.mydomain.com.
mydomain.com. A xxx.xx.xx.xx
mydomain.com. MX (10) mail.mydomain.com.
ftp.mydomain.com. CNAME mydomain.com.
mail.mydomain.com. A xxx.xx.xx.xx
ns.mydomain.com. A xxx.xx.xx.xx
webmail.mydomain.com. A xxx.xx.xx.xx
www.mydomain.com. CNAME mydomain.com.
zz-wildcard.mydomain.com. A xxx.xx.xx.xx


and on dns.myhostingprovider.com

mydomain.com NS ns1.hostingcompany.com 0 3600
mydomain.com NS ns2.hostingcompany.com 0 3600
mydomain.com MX mailhost.mydomain.com 10 3600
*.mydomain.com A xxx.xx.xx.xx 0 3600
mydomain.com A xxx.xx.xx.xx 0 3600
localhost.mydomain.com A 127.0.0.1 0 3600
mailhost.mydomain.com A xxx.xx.xx.xx 0 3600
www.mydomain.com A xxx.xx.xx.xx 0 3600

Any other tips??
regards
 
Doesn't help

When I create the subdomain as instructed, there is no default vhost.conf file created for the subdomain.

As a relative newbie to Plesk and Apache, I have no idea what the full file contents should be for the subdomain's default config (Even the Apache documentation does not give that).

Could you please post here or on the knowledge base article, the default contents for the subdomain file that should be in the subdomain's conf folder (and the correct file name).

.... half answers are infinitely more frustrating than no answers at all.

Thanks in advance
 
Got it

1. Perform the file name changes mentioned in the first post.
2. Do a normal Apache wildcard subdomain patch in var/www/vhosts/domain.com/conf/vhosts.conf
- - add line ServerAlias *.domain.com to the vhosts.conf
3. Add a *.domain.com CNAME domain.com entry to the domain's DNS
4. Restart Apache using the command line in Plesk knowledge base article 2239 linked in post #2 above

5. (Optional) If using WordPress MU or Multisite - go to the home blog admin and re-save the permalinks
6. (Optional) If your subdomains start serving up x-http-php files for your browser to save or run -> go back to step 5, or search that file name in Google for changes to be made to your htaccess file if not using WordPress.

Have just done the above and proven it's working on a Plesk 9.3 / Apache 2.2 / PHP 5.1.x VPS

---------------

During the same exercise, I have "discovered" the solution posted in post #2 above, ONLY works correctly if you're going to install a script in var/www/vhosts/domain.com/httpdocs/subdomains/httpdocs/ folder (i.e. a forum or blog or whatever), then all the subdomains will be picked up by the htaccess mod_rewrite rules there, and pointed to wherever they need to go.

If you're not going to be putting your virtual subdomains controller in that folder, then it is completely pointless creating that zz-wildcard subdomain as all it does is interfere with / negate the virtual subdomains controller in the domain.com/httpdocs/ root folder.

---------------------
< RANT >

My feeling is that Plesk have not caught up with the open source webscripts world, nor the growing use of virtual subdomaining via wildcards within those site scripts.

I also, for the life of me, cannot understand why Plesk introduced another layer of complexity and potential bugs/failures between the control panel users and default Apache wildcard and named subdomains functionality. Subdomain folders should be in domain.com/httpdocs/ where they can traverse the folder structure to obtain code or data from the parent domain's scripts and databases, not shuffled off into another parallel folder cascade .... Oh! Forgot - the authors are called Parallels, aren't they? That'll explain and excuse it then, does it?

Nor can I understand (or forgive) the introduction of a root/etc/httpd/conf.d contents-naming system that placed the named mail hosts/subdomains BELOW the entries for the domains and their wildcard subdomains, causing those webmail systems to be blockaded by the wildcards. As soon as that was spotted, a critical operations patch should have been pushed to all clients, not left for people to trip over in the middle of a five page "workarounds" forum thread. After all, that's a pretty serious functionality knockout you guys built into Plesk 9.3

< /RANT >
 
I still don't understand this...

So why can't I just set up webmail.domain.com and *.domain.com?

If I set up a second subdomain z.domain.com for my wildcard domains won't I have to upload the same website (set of files) to www.domain.com and z.domain.com???

If so, that is extremely lame. I hope I am just massively misunderstanding this!

Jim
 
Jim - webmail.domain.com is a website - an interface to access atmail or horde or whatever - it's not the actual mail service. Because of this, webmail.domain.com comes under normal http prioritisation in DNS

Therefore if your /etc/httpd/conf.d files are in the wrong sequence (as per plesk default) then *.domain.com is going to grab all calls to webmail.domain.com - even if you follow Plesk instructions in knowledgebase 2239, the same problem occurs.

You must rename the mail service files in /conf.d/ to give them a lower alphanumeric sort order than the domain's file (which runs an include to fetch the wildcard subdomain conf).

As to creating a full subdomain the plesk way, let's say you have wordpress in forum root and want to put a mailinglist manager like phpList in a subdomain instead of a subfolder, then using plesk's subdomain system is the way to go to create a listserver.domain.com subdomain.

But, you cannot use their wildcard subdomain method with WordPress - WordPress subdomain multisite installs MUST be in domain root. WordPress also internally controls subdomain redirection using a combination of htaccess rewrite rules, mod_rewrite, and an internal mappings database. The DNS entry is used only for handling incoming external requests and sending all *.domain.com calls to httpdocs root for WordPress to map and handle - that's why the plesk method fails, and why you have to renumber the mail confs in conf.d - to have them correctly directed before they are sent to the httpdocs root.
 
How to get real subdomains be processed before the wildcard

Hello Garry,
I found your reply to Barry's problem solving the webmail issue but I would like to know, how I can make Plesk/Appache process the real subdomains (like blog.example.com) before the wildcard record. I created a new thread to describe my problem and would be gratefull if you could have a look at it. See my post here.
Thanks,
Michael
 
Is there ANY solution of this problem for Plesk 10.1.1?

I configured wildcard subdomains as in http://kb.odin.com/en/2239:

- added file /var/www/vhosts/MYDOMAIN/conf/vhosts.conf with content: "ServerAlias *.MYDOMAIN"
- restarted server using /usr/local/psa/admin/bin/websrvmng -av
- added A record in DNS "*.MYDOMAIN -> MY IP"

Now is to website's folder redirected even subdomain "webmail", which is dedicated to webmail on server (and which was working OK before adding vhosts.conf).

All solutions I've found

(http://forum.parallels.com/pda/index.php/t-104753.html
http://codex.wordpress.org/Configuring_Wildcard_Subdomains_for_multi_site_under_Plesk_Control_Panel)

are based on file names in folder '/etc/httpd/conf.d/', which is apparently missing in the Plesk 10.1.1.

Any tips?
 
Hi MichalGow,
it is hard for me to believe, the path does not exist in Plesk 10.1.1. Just to make sure: have you checked with root access? In case you were accessing your server via ftp accounts for the specific domain, you most likely won't see this folder.
Please make sure you are checking from the / level and not the /www/var/vhost/MYDOMAIN/.
 
I've exactly the same problem: All published solutions - by renaming files zz001_atmail_vhost.conf & zz001_horde_vhost.conf - are for Plesk 9 (and under). They're removed in Plesk 10…
 
Does no one have a solution for that problem? I'm experiencing exactly this, the files are not there.
 
Hello,
I have the same problem... Does anyone have a solution ?
Does plesk 10.4.1 resolve this problem (I have 10.1.1) ?

I looking for a solution since 1 week and found nothing.

Any help would be really appreciated.
 
Same problem here, i've many newly created domains where webmail subdomain doesn't work at all. Old domains created with old plesks versions are fully functional.

Any hints?
 
Back
Top