Change Listen Port on httpd config for Varnish Configuration

27,952

In this file /etc/httpd/conf/httpd.conf there should be a line: ServerRoot "/etc/httpd" Below this line there is Listen 80 Change this to Listen 8080 and restart apache

Restarting with command: /etc/init.d/httpd restart

I also found this:-> http://updatedlinux.wordpress.com/2011/04/29/how-to-change-the-default-port-number-for-apache-http-server/

Possible that this will help!

Share:
27,952
cyildirim
Author by

cyildirim

Updated on September 11, 2020

Comments

  • cyildirim
    cyildirim almost 4 years

    I installed Varnish Cache my CentOS server.I try the do configuration correctly but as I read many document say to me change apache port Listen 80 to Listen 8080. But I couldn't find any Listen 80 line on my server /etc/httpd/conf/httpd.conf but i found 0.0.0.0:80 line. Is it same thing ? If those are same thinhgs, when i change my sites not working.

    I know that I make huge logical mistake but i can't understand.

    Thanks

  • cyildirim
    cyildirim about 11 years
    I am sorry. I search ServerRoot and /etc/httpd string in /etc/httpd/conf/httpd.confbut there is no both.
  • Leroy Meijer
    Leroy Meijer about 11 years
    Could you please provide apache version: [link]pixert.com/blog/how-to-find-apache-version-on-linux And also centos version. This is quite crazy because with me it is!
  • cyildirim
    cyildirim about 11 years
    Server version: Apache/2.2.24 (Unix) Server built: May 10 2013 00:34:01 Cpanel::Easy::Apache v3.18.13 rev9999 cenos version : CentOS release 5.8 (Final)
  • Leroy Meijer
    Leroy Meijer about 11 years
    I believe it should be in /var/cpanel/cpanel.config Look this link: [link]serverfault.com/questions/289067/…
  • cyildirim
    cyildirim about 11 years
    I can do this with Tweak settings on WHM and I understand that Listen 80 same with *:80 . But when i change 80 to 8080 i get could not bind to address 0.0.0.0:8080 error.
  • Leroy Meijer
    Leroy Meijer about 11 years
    Meaning there is already something bind to 8080: [link]centos.org/docs/5/html/5.2/Deployment_Guide/…
  • codegasm
    codegasm about 9 years
    Correct. Use 8008 instead of 8080