This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

How to add custom entry in vhost (SSL specific)
#1
[Not Solved] How to add custom entry in vhost (SSL specific)
Hi Community,


I am trying to configure SSL on the VPS using zPanel. I have added following entry in /etc/zpanel/configs/apache/httpd-vhosts.conf which does exactly what I want but somehow this entry getting removed automatically after day or two (I presume due to zPanel Daemon run).


Code:
<virtualhost XX.XXX.XXX.XXX:443>
DocumentRoot "/var/zpanel/hostdata/zadmin/public_html/mydomain_com"
ServerName dipakgajjar.com:443
ErrorLog "/var/zpanel/logs/domains/zadmin/mydomain.com-error.log"
CustomLog "/var/zpanel/logs/domains/zadmin/mydomain.com-access.log" combined
CustomLog "/var/zpanel/logs/domains/zadmin/mydomain.com-bandwidth.log" common
<Directory "/var/zpanel/hostdata/zadmin/public_html/mydomain_com">
   Options Indexes FollowSymLinks
   AllowOverride all
   Order allow,deny
   allow from all
</Directory>

SSLEngine On
SSLOptions +StrictRequire
SSLCertificateFile /etc/ssl/certs/mydomaincom.crt
SSLCertificateKeyFile /etc/ssl/certs/mydomain.com.key
SSLCertificateChainFile /etc/ssl/certs/mydomain.com.ca-bundle
</VirtualHost>
* XX.XXX.XXX.XXX is server IP and domain.com is domain name for which I want to configure SSL.

How can I fix this to make SSL work without any issues?
Reply
Thanks given by:
#2
[Not Solved] RE: How to add custom entry in vhost (SSL specific)
I have fixed it myself. Here is how...

- Created a new file httpd-ssl-vhosts.conf under /etc/zpanel/configs/apache/
- Added the above configuration code for SSL in it
- In /etc/zpanel/configs/apache/httpd.conf, added following line at the end of file
 Include /etc/zpanel/configs/apache/httpd-ssl-vhosts.conf
- Restarted Apache

It's done Smile
Reply
Thanks given by:
#3
[Not Solved] RE: How to add custom entry in vhost (SSL specific)
(03-01-2015, 02:48 PM)dipakcg Wrote: I have fixed it myself. Here is how...

- Created a new file httpd-ssl-vhosts.conf under /etc/zpanel/configs/apache/
- Added the above configuration code for SSL in it
- In /etc/zpanel/configs/apache/httpd.conf, added following line at the end of file
 Include /etc/zpanel/configs/apache/httpd-ssl-vhosts.conf
- Restarted Apache

It's done Smile

Thank you this helped me alot Tongue
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
FTP Accounts To One Specific Folder sathish2009 4 8 504 11-22-2016, 05:09 AM
Last Post: TGates
how to change zpanel control panel address to a specific port rajeevrrs 14 54 299 04-21-2015, 07:58 PM
Last Post: estebandb
how to install startssl.com for specific name virtual hosts bentech4u 2 5 428 11-23-2014, 11:26 PM
Last Post: bentech4u

Forum Jump:


Users browsing this thread: 1 Guest(s)