I am trying to install and configure Varnish 3 on Centos 6.6
The problem is Nginx is running as reverse proxy on ports 80 and 8080.
Apache is running on port 7080
I did all the changes in conf files of nginx however it is still listening on ports 80 and 8080 that's why varnish is not working.
How can I change the nginx port from 80 to 8080?
netstat -tulpn gives the following: (the x are the ip address of the server)
tcp 0 0 xx.xxx.xx.xx:80 0.0.0.0:* LISTEN 17048/nginx
tcp 0 0 xx.xxx.xx.xx:8080 0.0.0.0:* LISTEN 17048/nginx
Edit the file /etc/nginx/sites-enabled/default or wherever your listen directive is:
https://stackoverflow.com/a/12800469
Then restart server!
Related
why xampp does not listen to port 443, even though in the config the SSL port is filled 443. can somebody help me? thank you
I have a SSL server started on port 8080.
I want to redirect all browser requests to this port
from 80 (http://...) and from 443 (https://...)
Should I do
1) 80 forward to 8080; 443 forward to 8080 or
2) 80 forward to 443; 443 forward to 8080
Is there any difference in these approaches and what is correct?
Thanks!
I'm developing apache2 environment on my EC2 instance. For security, I want to change ssl port of apache2.
I've already confirmed default ssl port 443 was working by checking page with chrome browser. But after modifying ports.conf like below, I've got an error, ERR_SSL_PROTOCOL_ERROR when accessing this server like https://xxxxxxx:18443/
Are there any settings for changing ssl port?
listening ports
$ ss -lnt
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:22 *:*
LISTEN 0 64 *:7777 *:*
LISTEN 0 50 127.0.0.1:3306 *:*
LISTEN 0 128 :::22 :::*
LISTEN 0 128 :::18443 :::*
/etc/apache2/ports.conf
#Listen 80
<IfModule ssl_module>
Listen 18443
</IfModule>
<IfModule mod_gnutls.c>
Listen 18443
</IfModule>
environment
OS: ubuntu 14.04 server (Amazon/EC2 AMI)
apache: Apache/2.4.7 (Ubuntu)
EC2 inbound security policy
Custom TCP rule: TCP, 18443, 0.0.0.0/0
Custom UDP rule: UDP, 18443, 0.0.0.0/0
I found an answer by myself. I also need to edit default-ssl.conf. So I summarize all procedures to set up ssl and changing its port. In this example, I change ssl port to 18443 from 443.
$ sudo apt-get install apache2
$ sudo a2enmod ssl
$ sudo a2ensite default-ssl
$ sudo service apache2 restart
$ ss -lnt
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 :::443 :::*
LISTEN 0 128
Then, try to change ssl port.
$ sudo vi /etc/apache2/ports.conf
<IfModule ssl_module>
Listen 18443
</IfModule>
<IfModule mod_gnutls.c>
Listen 18443
</IfModule>
In this setting, I used default-ssl, so I also have to modify this file.
$ sudo vi /etc/apache2/sites-available/default-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:18443>
...
Then, you restart apache2 and you can access http://xxxxxx:18443/
$ sudo service apache2 restart
I'm having a problem in my web-server (centOS 7). I've set up xampp and I want to access htdocs from a different machine. However I get connection expired.
I'm connecting on port 80 and I've checked # netstat -nlp:
tcp6 0 0 :::80 :::* LISTEN 10366/httpd
and # netstat -tul:
tcp6 0 0 :::80 :::* LISTEN 0
I've also checked httpd.conf and it contains:
Listen 80
I've set a firewall exception and I still can't access htdocs. Does anyone know what I'm missing?
EDIT: I've also checked it the port was opened using # telnet myserver.com 80 and I managed to connect to the server using port 80.
EDIT2: After re-setting the firewall restrictions, and enabling any LAN user to access the server, the connection finally happened.
I am running xampp on an external facing server (i know people recommend against this, we've configured it pretty tightly [I think!]). We are using control panel v3.1.0 and it has a column called Port(s). The apache ports shown keep changing, and cycling through the udp ports, as well as listing the standard apache ports:
Port(s)
80, 443
80, 443, 1245
80, 443
80, 443, 1246
80, 443, 1247
What does this mean? Are we getting scanned (I don't control our firewall but they say the ports are locked down to 80 and 443)?
httpd.conf
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
httpd-ssl.conf
#Listen 0.0.0.0:443
#Listen [::]:443
Listen 443
It might also be worth noting that this machine is running moodle 2.2
These are the ports that MySQL discuss with Apache.
3306 <-> 1245 etc.
Nothing to worry about.