How can I enable SSL on my Apache for more than one port? (Got an eror)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I need to enable SSL for more ports than 443. I've tried it this way:



First I've added the port to my ports.conf



Listen 8081


After this I've edited my vHost in my Apache:



<VirtualHost *:8081>

Here are my other settings.... (not important I think)

SSLEngine On
SSLCertificateFile /the/certificate/file
SSLCertificateKeyFile /the/key/file
</VirtualHost>


After this I've tried to restart my apache but it says config error and the server won't start again. Before I've tried to add SSL my vHost worked so the problem is not my other configuration.



In the error log I found this here: Caught SIGTERM, shutting down



I'm currently runnning the standard SSL port 443 for my website and configured this in the standard SSL config from apache.



******** UPDATE ********



This is the full config file:



# phpMyAdmin default Apache configuration

<VirtualHost *:8081>
Alias /phpMyAdmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1

SSLEngine on
SSLCertificateFile .....
SSLCertificateKeyFile .....

Options FollowSymLinks
DirectoryIndex index.phpMyAdmin

<IfModule mod_php.c>
<IfModule mod_mine.configuration>
AddType application/x-httpd-php .php
</IfModule>
<FilesMatch ".+php$">
SetHandler application/x-httpd-php
</FilesMatch

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_flag allow_url_fopen On
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/ph$
</IfModule>
</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authz_core.c>
<IfModule mod_authm_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</IfModule>
</Directory>

</VirtualHost>






share|improve this question


















  • 1




    The stuff right before "Caught SIGTERM, shutting down" will probably be more helpful
    – Bandrami
    Feb 26 at 16:32










  • Please run sudo apachectl configtest and paste the output into your question!
    – George Udosen
    Feb 26 at 16:35











  • @Bandrami there is "mpm_prefork:notice"
    – Johnny G.
    Feb 26 at 16:39










  • @GeorgeUdosen I've did this and it says Sytax error on line 12. Line 12 is "SSLEngine On"
    – Johnny G.
    Feb 26 at 16:41










  • Please kindly add the "not important settings"!
    – George Udosen
    Feb 26 at 17:15














up vote
0
down vote

favorite












I need to enable SSL for more ports than 443. I've tried it this way:



First I've added the port to my ports.conf



Listen 8081


After this I've edited my vHost in my Apache:



<VirtualHost *:8081>

Here are my other settings.... (not important I think)

SSLEngine On
SSLCertificateFile /the/certificate/file
SSLCertificateKeyFile /the/key/file
</VirtualHost>


After this I've tried to restart my apache but it says config error and the server won't start again. Before I've tried to add SSL my vHost worked so the problem is not my other configuration.



In the error log I found this here: Caught SIGTERM, shutting down



I'm currently runnning the standard SSL port 443 for my website and configured this in the standard SSL config from apache.



******** UPDATE ********



This is the full config file:



# phpMyAdmin default Apache configuration

<VirtualHost *:8081>
Alias /phpMyAdmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1

SSLEngine on
SSLCertificateFile .....
SSLCertificateKeyFile .....

Options FollowSymLinks
DirectoryIndex index.phpMyAdmin

<IfModule mod_php.c>
<IfModule mod_mine.configuration>
AddType application/x-httpd-php .php
</IfModule>
<FilesMatch ".+php$">
SetHandler application/x-httpd-php
</FilesMatch

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_flag allow_url_fopen On
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/ph$
</IfModule>
</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authz_core.c>
<IfModule mod_authm_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</IfModule>
</Directory>

</VirtualHost>






share|improve this question


















  • 1




    The stuff right before "Caught SIGTERM, shutting down" will probably be more helpful
    – Bandrami
    Feb 26 at 16:32










  • Please run sudo apachectl configtest and paste the output into your question!
    – George Udosen
    Feb 26 at 16:35











  • @Bandrami there is "mpm_prefork:notice"
    – Johnny G.
    Feb 26 at 16:39










  • @GeorgeUdosen I've did this and it says Sytax error on line 12. Line 12 is "SSLEngine On"
    – Johnny G.
    Feb 26 at 16:41










  • Please kindly add the "not important settings"!
    – George Udosen
    Feb 26 at 17:15












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I need to enable SSL for more ports than 443. I've tried it this way:



First I've added the port to my ports.conf



Listen 8081


After this I've edited my vHost in my Apache:



<VirtualHost *:8081>

Here are my other settings.... (not important I think)

SSLEngine On
SSLCertificateFile /the/certificate/file
SSLCertificateKeyFile /the/key/file
</VirtualHost>


After this I've tried to restart my apache but it says config error and the server won't start again. Before I've tried to add SSL my vHost worked so the problem is not my other configuration.



In the error log I found this here: Caught SIGTERM, shutting down



I'm currently runnning the standard SSL port 443 for my website and configured this in the standard SSL config from apache.



******** UPDATE ********



This is the full config file:



# phpMyAdmin default Apache configuration

<VirtualHost *:8081>
Alias /phpMyAdmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1

SSLEngine on
SSLCertificateFile .....
SSLCertificateKeyFile .....

Options FollowSymLinks
DirectoryIndex index.phpMyAdmin

<IfModule mod_php.c>
<IfModule mod_mine.configuration>
AddType application/x-httpd-php .php
</IfModule>
<FilesMatch ".+php$">
SetHandler application/x-httpd-php
</FilesMatch

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_flag allow_url_fopen On
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/ph$
</IfModule>
</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authz_core.c>
<IfModule mod_authm_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</IfModule>
</Directory>

</VirtualHost>






share|improve this question














I need to enable SSL for more ports than 443. I've tried it this way:



First I've added the port to my ports.conf



Listen 8081


After this I've edited my vHost in my Apache:



<VirtualHost *:8081>

Here are my other settings.... (not important I think)

SSLEngine On
SSLCertificateFile /the/certificate/file
SSLCertificateKeyFile /the/key/file
</VirtualHost>


After this I've tried to restart my apache but it says config error and the server won't start again. Before I've tried to add SSL my vHost worked so the problem is not my other configuration.



In the error log I found this here: Caught SIGTERM, shutting down



I'm currently runnning the standard SSL port 443 for my website and configured this in the standard SSL config from apache.



******** UPDATE ********



This is the full config file:



# phpMyAdmin default Apache configuration

<VirtualHost *:8081>
Alias /phpMyAdmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1

SSLEngine on
SSLCertificateFile .....
SSLCertificateKeyFile .....

Options FollowSymLinks
DirectoryIndex index.phpMyAdmin

<IfModule mod_php.c>
<IfModule mod_mine.configuration>
AddType application/x-httpd-php .php
</IfModule>
<FilesMatch ".+php$">
SetHandler application/x-httpd-php
</FilesMatch

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_flag allow_url_fopen On
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/ph$
</IfModule>
</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authz_core.c>
<IfModule mod_authm_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</IfModule>
</Directory>

</VirtualHost>








share|improve this question













share|improve this question




share|improve this question








edited Feb 27 at 10:28

























asked Feb 26 at 16:02









Johnny G.

11




11







  • 1




    The stuff right before "Caught SIGTERM, shutting down" will probably be more helpful
    – Bandrami
    Feb 26 at 16:32










  • Please run sudo apachectl configtest and paste the output into your question!
    – George Udosen
    Feb 26 at 16:35











  • @Bandrami there is "mpm_prefork:notice"
    – Johnny G.
    Feb 26 at 16:39










  • @GeorgeUdosen I've did this and it says Sytax error on line 12. Line 12 is "SSLEngine On"
    – Johnny G.
    Feb 26 at 16:41










  • Please kindly add the "not important settings"!
    – George Udosen
    Feb 26 at 17:15












  • 1




    The stuff right before "Caught SIGTERM, shutting down" will probably be more helpful
    – Bandrami
    Feb 26 at 16:32










  • Please run sudo apachectl configtest and paste the output into your question!
    – George Udosen
    Feb 26 at 16:35











  • @Bandrami there is "mpm_prefork:notice"
    – Johnny G.
    Feb 26 at 16:39










  • @GeorgeUdosen I've did this and it says Sytax error on line 12. Line 12 is "SSLEngine On"
    – Johnny G.
    Feb 26 at 16:41










  • Please kindly add the "not important settings"!
    – George Udosen
    Feb 26 at 17:15







1




1




The stuff right before "Caught SIGTERM, shutting down" will probably be more helpful
– Bandrami
Feb 26 at 16:32




The stuff right before "Caught SIGTERM, shutting down" will probably be more helpful
– Bandrami
Feb 26 at 16:32












Please run sudo apachectl configtest and paste the output into your question!
– George Udosen
Feb 26 at 16:35





Please run sudo apachectl configtest and paste the output into your question!
– George Udosen
Feb 26 at 16:35













@Bandrami there is "mpm_prefork:notice"
– Johnny G.
Feb 26 at 16:39




@Bandrami there is "mpm_prefork:notice"
– Johnny G.
Feb 26 at 16:39












@GeorgeUdosen I've did this and it says Sytax error on line 12. Line 12 is "SSLEngine On"
– Johnny G.
Feb 26 at 16:41




@GeorgeUdosen I've did this and it says Sytax error on line 12. Line 12 is "SSLEngine On"
– Johnny G.
Feb 26 at 16:41












Please kindly add the "not important settings"!
– George Udosen
Feb 26 at 17:15




Please kindly add the "not important settings"!
– George Udosen
Feb 26 at 17:15










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I just finished setting up an apache2 and I updated exactly what you asked.



ports.conf



Listen 80

<IfModule ssl_module>
# Listen 443
Listen 8081
</IfModule>

<IfModule mod_gnutls.c>
# Listen 443
Listen 8081
</IfModule>


vhost.conf



<VirtualHost *:8081>
ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/my-site

LogLevel info ssl:warn

SSLEngine On
SSLCertificateFile /your/cert.cert
SSLCertificateKeyFile /your/key.key

ErrorLog $APACHE_LOG_DIR/my-site.error.log
CustomLog $APACHE_LOG_DIR/my-site.access.log combined

</VirtualHost>


ps. My SSLEngine On is so written, still, it works. I don't think the issue is to be searched there.






share|improve this answer




















  • Then how come the error points to line 12, what Linux version are you using?
    – George Udosen
    Feb 26 at 17:08











  • Does not always mean the error is there, might be on the previous row. And anyway, all my Apache2 have it mixed, On and on, I doubt it is it
    – Nihvel
    Feb 26 at 17:11










  • Ok, if you say so!
    – George Udosen
    Feb 26 at 17:15










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f426721%2fhow-can-i-enable-ssl-on-my-apache-for-more-than-one-port-got-an-eror%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













I just finished setting up an apache2 and I updated exactly what you asked.



ports.conf



Listen 80

<IfModule ssl_module>
# Listen 443
Listen 8081
</IfModule>

<IfModule mod_gnutls.c>
# Listen 443
Listen 8081
</IfModule>


vhost.conf



<VirtualHost *:8081>
ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/my-site

LogLevel info ssl:warn

SSLEngine On
SSLCertificateFile /your/cert.cert
SSLCertificateKeyFile /your/key.key

ErrorLog $APACHE_LOG_DIR/my-site.error.log
CustomLog $APACHE_LOG_DIR/my-site.access.log combined

</VirtualHost>


ps. My SSLEngine On is so written, still, it works. I don't think the issue is to be searched there.






share|improve this answer




















  • Then how come the error points to line 12, what Linux version are you using?
    – George Udosen
    Feb 26 at 17:08











  • Does not always mean the error is there, might be on the previous row. And anyway, all my Apache2 have it mixed, On and on, I doubt it is it
    – Nihvel
    Feb 26 at 17:11










  • Ok, if you say so!
    – George Udosen
    Feb 26 at 17:15














up vote
0
down vote













I just finished setting up an apache2 and I updated exactly what you asked.



ports.conf



Listen 80

<IfModule ssl_module>
# Listen 443
Listen 8081
</IfModule>

<IfModule mod_gnutls.c>
# Listen 443
Listen 8081
</IfModule>


vhost.conf



<VirtualHost *:8081>
ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/my-site

LogLevel info ssl:warn

SSLEngine On
SSLCertificateFile /your/cert.cert
SSLCertificateKeyFile /your/key.key

ErrorLog $APACHE_LOG_DIR/my-site.error.log
CustomLog $APACHE_LOG_DIR/my-site.access.log combined

</VirtualHost>


ps. My SSLEngine On is so written, still, it works. I don't think the issue is to be searched there.






share|improve this answer




















  • Then how come the error points to line 12, what Linux version are you using?
    – George Udosen
    Feb 26 at 17:08











  • Does not always mean the error is there, might be on the previous row. And anyway, all my Apache2 have it mixed, On and on, I doubt it is it
    – Nihvel
    Feb 26 at 17:11










  • Ok, if you say so!
    – George Udosen
    Feb 26 at 17:15












up vote
0
down vote










up vote
0
down vote









I just finished setting up an apache2 and I updated exactly what you asked.



ports.conf



Listen 80

<IfModule ssl_module>
# Listen 443
Listen 8081
</IfModule>

<IfModule mod_gnutls.c>
# Listen 443
Listen 8081
</IfModule>


vhost.conf



<VirtualHost *:8081>
ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/my-site

LogLevel info ssl:warn

SSLEngine On
SSLCertificateFile /your/cert.cert
SSLCertificateKeyFile /your/key.key

ErrorLog $APACHE_LOG_DIR/my-site.error.log
CustomLog $APACHE_LOG_DIR/my-site.access.log combined

</VirtualHost>


ps. My SSLEngine On is so written, still, it works. I don't think the issue is to be searched there.






share|improve this answer












I just finished setting up an apache2 and I updated exactly what you asked.



ports.conf



Listen 80

<IfModule ssl_module>
# Listen 443
Listen 8081
</IfModule>

<IfModule mod_gnutls.c>
# Listen 443
Listen 8081
</IfModule>


vhost.conf



<VirtualHost *:8081>
ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/my-site

LogLevel info ssl:warn

SSLEngine On
SSLCertificateFile /your/cert.cert
SSLCertificateKeyFile /your/key.key

ErrorLog $APACHE_LOG_DIR/my-site.error.log
CustomLog $APACHE_LOG_DIR/my-site.access.log combined

</VirtualHost>


ps. My SSLEngine On is so written, still, it works. I don't think the issue is to be searched there.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 26 at 16:55









Nihvel

101




101











  • Then how come the error points to line 12, what Linux version are you using?
    – George Udosen
    Feb 26 at 17:08











  • Does not always mean the error is there, might be on the previous row. And anyway, all my Apache2 have it mixed, On and on, I doubt it is it
    – Nihvel
    Feb 26 at 17:11










  • Ok, if you say so!
    – George Udosen
    Feb 26 at 17:15
















  • Then how come the error points to line 12, what Linux version are you using?
    – George Udosen
    Feb 26 at 17:08











  • Does not always mean the error is there, might be on the previous row. And anyway, all my Apache2 have it mixed, On and on, I doubt it is it
    – Nihvel
    Feb 26 at 17:11










  • Ok, if you say so!
    – George Udosen
    Feb 26 at 17:15















Then how come the error points to line 12, what Linux version are you using?
– George Udosen
Feb 26 at 17:08





Then how come the error points to line 12, what Linux version are you using?
– George Udosen
Feb 26 at 17:08













Does not always mean the error is there, might be on the previous row. And anyway, all my Apache2 have it mixed, On and on, I doubt it is it
– Nihvel
Feb 26 at 17:11




Does not always mean the error is there, might be on the previous row. And anyway, all my Apache2 have it mixed, On and on, I doubt it is it
– Nihvel
Feb 26 at 17:11












Ok, if you say so!
– George Udosen
Feb 26 at 17:15




Ok, if you say so!
– George Udosen
Feb 26 at 17:15












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f426721%2fhow-can-i-enable-ssl-on-my-apache-for-more-than-one-port-got-an-eror%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay