[SOLVED!] Problems after change port:80 in Apache
Added by Michelle R. over 11 years ago
Hi
I'm new with the platform. I changed the port 80 in apache because I require get connection using a different port. I assign the port 8000 in httpd.config file and I define it in iptables.
It seems to work ok, but when I request connection to the application through the ip using firefox, it returns the following error " ssl_error_rx_record_too_long".
Thanks for your assistance to solve this problem.
Michelle R.
Replies (2)
solved
-
Added by Michelle R. over 11 years ago
The change of the port is done because the ISP reserve for themself the ports 80 and 8080 so the standard instalation doesn't work for deploy a server on the cloud
I did the following configuration
*Update the router *
The router get open the port 8000
Update IPtable
It's necesary to open the port on the firewall. I include the required port - 8000
Generate a self signed SSL certificate
Generate private key
openssl genrsa -out ca.key 1024
Generate CSR
openssl req -new -key ca.key -out ca.csr
Generate Self Signed Key
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
Copy the files to the correct locations
cp ca.crt /etc/pki/tls/certs
cp ca.key /etc/pki/tls/private/ca.key
cp ca.csr /etc/pki/tls/private/ca.csr
*Update the Apache SSL configuration file *
vi +/SSLCertificateFile /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
service httpd restart
Update httpd.conf
(The listening of the port 80 was not deactivated)
Listen 8081 http
NameVirtualHost *:8000
NameVirtualHost *:443
<VirtualHost *:8000>
<Directory /var/www/html>
AllowOverride All
</Directory>
DocumentRoot /var/www/html
ServerName *:8000</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
<Directory /var/www/html>
AllowOverride All
</Directory>
DocumentRoot /var/www/vhosts/yoursite.com/httpsdocs
ServerName *:8000
</VirtualHost>service httpd restart
The SSL configuration and update of the httpd is the one described in - http://wiki.centos.org/es/HowTos/Https
I hope that can be helpfull
RE: Problems after change port:80 in Apache
-
Added by Demian Biscocho over 11 years ago
Thank you for posting your solution.