• 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.

Wildcard SSL with multiple subdomains

J

jayzee

Guest
Hi,

I have a wild card SSL cert for a domain *.secureserveruk.com

I want to be able to use the SSL cert on multiple shops and was hoping to be able to do some thing like.

Main part of unsecured site
http://www.shop1.com
and then for the secure part of the site
https://shop1.secureserveruk.com

and then for future shops I woudl be able to do
http://www.shop2.com
https://shop2.secureserveruk.com

I am running plesk 8.1 and have got my SSL cert configured but my problem is I want the shop php script for each shop to only be in one directory.

the only suggestion I have come up with so far is to have a copy of the shop script in both the
/var/www/vhosts/shop1.secureserveruk.com/httpsdocs/
and
/var/www/vhosts/shop1.com/httpdocs/

I want to avoid this if at all possible as it is going to cause me no end of problems trying to keep the files upto date with each other.

I have tried to edit the
/var/www/vhosts/shop1.secureserveruk.com/conf/httpd.include file to change the document root to the
/var/www/vhosts/shop1.com/httpsdocs/
directory but this doesn't work properly, it will either download the file or display the contents of the file within the browser but without processing the php.

Is it possible to do what I want to? I have seen other people wantig to do the equivilant of

https://www.secureserveruk.com/~shop1/
https://www.secureserveruk.com/~shop2/

and this seems possible

thanks for any help

jay
 
any body any idea of how to do this or if it's even possible?

I am guessing it's not going to be easy but there must be a way of configuring this??
thanks for any help the can be provided

J
 
you want a soft link.

Go to wherever you want to create the linked directory

/var/www/vhost/shop1.secureserveruk.com

insert this command (I think you have to be root)

ln -s /var/www/vhosts/shop1.com/httpdocs

anything you update on the shop will be updated on the secure site. It also doesn't require additional disk space.
 
hi

thanks for the reply.

I have moved to the shop1.secureserveruk.com directory using putty logged in as root.



I have then tried the command

ln -s /var/www/vhosts/shop1.com/httpdocs

but i am getting an error

ln: `./httpdocs': cannot overwrite directory

the shop1/httpdocs direstory does exist as thats where the site is.

what is happening?

thanks again
J
 
OK I renamed the orig httpdocs folder in

/var/www/vhost/shop1.secureserveruk.com

to something else and now the command works without returning an error

now when I visit the address

https://shop1.secureserveruk.com/

I get the error in the browser

"
Forbidden
You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
"

so it looks like it is trying to get to the right page and in fact if I use the file manager in plesk when I navigat to the httpdocs directory on the shop.secureserveruk.com folder it shows me the contents of the shop1.com httpdocs directory so it is sort of working.

I am not sure which permissions are wrong though?

I have set the domain shop1.secureserveruk.com up in plesk with its own hosting, should I have done this becuase you don't mention having to rename any directories?

thanks again
J
 
You need to make a .htaccess file and put the following in
Code:
Options +FollowSymLinks
Options +Indexes
Without that, Apache won't follow symbolic links.
 
I have added this in my vhost.conf file and I still get the same error.

I have read people saying it may be to do with the permissions on the httpdocs softlink/symlink but I don't know what I should be setting them to for it to work?

J
 
any body know what the permissions should be set to to make this work?

it seems that this maybe the only thing that is now stopping it from working?

Many Thanks for any help you can provide

J
 
eventualy after messing around with adding

Options +FollowSymLinks
Options +Indexes

to my vhost.conf file and trying different orders and with and without the + signs I got it working.

quite please really as the hosting company had had a look and claimed it couldn't be done :)
 
Back
Top