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.

SSL and non-SSL same site
#1
SSL and non-SSL same site
Hey there,

I would like to set my domain to be the same when I access it with http and https request.
I don't want to forward port 80. 

So basically http://domain.tld and https://domain.tld should go to same page.

How can I do this?

Cheers,
Gabriel
Reply
Thanks given by:
#2
RE: SSL and non-SSL same site
(01-09-2016, 05:10 AM)gwolf2u Wrote: Hey there,

I would like to set my domain to be the same when I access it with http and https request.
I don't want to forward port 80. 

So basically http://domain.tld and https://domain.tld should go to same page.

How can I do this?

Cheers,
Gabriel

I managed this by adding a listen 443 in /etc/apache2/apache.conf just above where the include for sentoras config is (might be httpd.conf instead of apache.conf for you.)

Then go into virtual host overrides setting, leave the override port blank and take a copy of the domain config from /etc/zpanel/config/apache/httpd-vhosts.conf and paste it into the text box. Change the port and add your ssl stuff. You will need to close the original virtualhosts statement at the top too. So for example something like this:

Code:
</virtualhost>
<virtualhost *:443>
ServerName example.com
ServerAlias  www.example.com
ServerAdmin someone@email.com
DocumentRoot "/var/sentora/hostdata/username/public_html/example_com"
php_admin_value open_basedir "/var/sentora/hostdata/username/public_html/example_com:/var/sentora/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
ErrorLog "/var/sentora/logs/domains/username/example.com-error.log"
CustomLog "/var/sentora/logs/domains/username/example.com-access.log" combined
CustomLog "/var/sentora/logs/domains/username/example.com-bandwidth.log" common
<Directory "/var/sentora/hostdata/username/public_html/example_com">
 Options +FollowSymLinks -Indexes
 AllowOverride All
 Require all granted
</Directory>
AddType application/x-httpd-php .php3 .php
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 500 /_errorpages/500.html
ErrorDocument 510 /_errorpages/510.html
DirectoryIndex index.html index.htm index.php index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /data/sentora/hostdata/username/ssl_certs/www_example_com/www.example.com_ssl_certificate.cer
SSLCertificateKeyFile /data/sentora/hostdata/username/ssl_certs/www_example_com/www.example.com_private_key.key
SSLCertificateChainFile /data/sentora/hostdata/username/ssl_certs/www_example_com/www.example.com_ssl_certificate_INTERMEDIATE.cer

Adjust to your needs. Don't close of the virtualhost statement. Sentora will do that for you. Then wait for the daemon to run it's update.
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Site Not Updating changes made in The HTML file me7leelee 4 9 ,323 05-20-2020, 06:29 PM
Last Post: 5050
Port 80 AND 443 on site creation Doge 1 5 ,035 05-01-2018, 12:59 PM
Last Post: TGates
site not working after adding SSL code in Sentora override option premwithme 4 11 ,615 10-22-2017, 08:15 PM
Last Post: nscloud

Forum Jump:


Users browsing this thread: 2 Guest(s)