How can I enable SSL on my Apache for more than one port? (Got an eror)
Clash 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>
linux ubuntu ssl apache-virtualhost
 |Â
show 4 more comments
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>
linux ubuntu ssl apache-virtualhost
1
The stuff right before "Caught SIGTERM, shutting down" will probably be more helpful
â Bandrami
Feb 26 at 16:32
Please runsudo 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
 |Â
show 4 more comments
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>
linux ubuntu ssl apache-virtualhost
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>
linux ubuntu ssl apache-virtualhost
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 runsudo 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
 |Â
show 4 more comments
1
The stuff right before "Caught SIGTERM, shutting down" will probably be more helpful
â Bandrami
Feb 26 at 16:32
Please runsudo 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
 |Â
show 4 more comments
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.
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
andon
, I doubt it is it
â Nihvel
Feb 26 at 17:11
Ok, if you say so!
â George Udosen
Feb 26 at 17:15
add a comment |Â
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.
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
andon
, I doubt it is it
â Nihvel
Feb 26 at 17:11
Ok, if you say so!
â George Udosen
Feb 26 at 17:15
add a comment |Â
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.
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
andon
, I doubt it is it
â Nihvel
Feb 26 at 17:11
Ok, if you say so!
â George Udosen
Feb 26 at 17:15
add a comment |Â
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.
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.
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
andon
, I doubt it is it
â Nihvel
Feb 26 at 17:11
Ok, if you say so!
â George Udosen
Feb 26 at 17:15
add a comment |Â
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
andon
, 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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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