Z
Z
zzmaster2014-09-07 10:15:21
Apache HTTP Server
zzmaster, 2014-09-07 10:15:21

How to stop nginx and bring back apache?

I connected the site to Cloudflare and decided that two caching proxies are too much, I will disable nginx. At the same time, I would like to leave it in the system just in case, but so that it does not start. First of all, I stopped the
service nginx stop
site, naturally fell, because there was nobody on the 80th port. OK, I open /etc/httpd/conf/httpd.conf with the intention of replacing Lister чтого-то-тамwith Listen 80- and I see that the file does not contain the Listen directive at all! It's strange, I think, maybe Apache listens on 8080 by default (namely, this backend port is specified in the nginx config), okay, I add a line
Listen myip:80 (I also tried without myip) I
restart Apache
service httpd restart
and see a panel stub instead of a site: It worked! Powered by VESTA
I look at the list of listeners on port 80:

[[email protected] ~]# netstat -tulpn |grep :80
tcp        0      0 myip:80          0.0.0.0:*                   LISTEN      21673/httpd
tcp        0      0 myip:8080        0.0.0.0:*                   LISTEN      21673/httpd
tcp        0      0 127.0.0.1:8081              0.0.0.0:*                   LISTEN      21673/httpd
tcp        0      0 0.0.0.0:8083                0.0.0.0:*                   LISTEN      1392/nginx

everything seems to be in order. ok, I think something may not have grown together with cloudflare, I'm doing
wget http://myip/ru
--2014-09-07 03:06:28--  http://myip/ru
Connecting to 162.243.112.238:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2014-09-07 03:06:28 ERROR 404: Not Found.

if you also request the root using the IP, then the Vesta stub is returned.
it turns out that httpd.conf is a valid config, because changes in it lead to changes in the results of requests, but I don’t even understand if I got through to Apache. this is happening on CentOS 6.5
, help me, good people...

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
S
Sergey Petrikov, 2014-09-07
@RicoX

Well, at least show the Apache config along with the subconfigs - there are no psychics, but most likely there is some kind of subconfig that sets this behavior.

Z
zzmaster, 2014-09-07
@zzmaster

yes, sorry, everything is here
pastebin.com/hXEevVgi
there are a few more confs, but I renamed them to ~conf, restarted Apache and the problem remained

Stopping httpd:                                            [  OK  ]
Starting httpd: [Sun Sep 07 05:42:21 2014] [warn] NameVirtualHost 1.2.3.4:8443 has no VirtualHosts

I did not pay attention to this at first, when restarting from nginx - the same picture, but then I added the ServerName
/etc/hosts directive to /etc/host and httpd.conf ============== ================================================
127.0 .0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
1.2.3.4 lermont domain.com localhost

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question