?
Solved

Turn off apache

Posted on 2014-09-07
22
Medium Priority
?
471 Views
Last Modified: 2014-09-10
Hi, I want to turn off apache on openSUSE.
0
Comment
Question by:Nusrat Nuriyev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 4
  • 3
  • +3
22 Comments
 

Author Comment

by:Nusrat Nuriyev
ID: 40308483
nothing after this commands
ps ax | grep "http"
ps ax | grep "apache"
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40308484
generally, it works(by work I mean it can open the index.html) when I type localhost but doen't work when I put ip address. Ok, this is too complicated task. let's give you a little less complicated task.
How to find httpd.conf
Where is it?
OpenSUSE 13.11
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40308486
also how to install locate?
why "zypper in locate"  can't locate "locate" package?
0
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 

Author Comment

by:Nusrat Nuriyev
ID: 40308487
Also, why there is a mess with names httpd and apache2.
What is the difference between them to? why it installs lighttpd when I install httpd?
0
 
LVL 1

Expert Comment

by:Mahesh Y
ID: 40308501
Configuration files and location of files is httpd.conf ..But the service runs is called as apache2
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40308505
That's strange because I can't find process apache2, but browser can open the index.html

I know that httpd.conf is  conf files. Where it should be?
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40308519
installation:
yast2 -i apache2
startup:
systemctl restart apach2.service
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40308521
why service apache2 start says that
"service: no such service apache2"?
0
 
LVL 14

Expert Comment

by:ThomasMcA2
ID: 40308541
On my openSUSE 13.1, ps ax | grep "apache"  returns this:
~ $ ps ax | grep "apache" 
11285 ?        Ss     0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
11303 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
11304 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
11305 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
11307 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
11308 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
11842 ?        S      0:00 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -DFOREGROUND -k start
13421 pts/0    S+     0:00 grep --colour=auto apache

Open in new window


Since that returns nothing on your system, apache is not running on your system.

My Apache config file is /etc/apache2/httpd.conf

I use Apache to run a local wiki that I use for personal documentation. Here is an example of a local URL: http://localhost/wiki/index.php/Special:AllPages
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40308581
If you want to prevent Apache from starting, try this:

# chkconfig --del apache

or

# chkconfig --del apache2

chkconfig will modify the config files that start system services

If you want to remove it completely, uninstall using yast2 or suse package management.
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40309254
why service apache2 start says that
"service: no such service apache2"?

however,
systemctl status apache2.service
works?
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40309523
Looks like your service is called "apache2.service", can you try:

service apache2.service status
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40310108
Gerwin, nope.
service apache2.service status
doesn't work
0
 
LVL 12

Expert Comment

by:Kent W
ID: 40310173
Your service is actually called httpd2

service httpd2 status

chkconfig httpd2 off

will turn it off on bootup
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40310179
mugojava, nope.

service httpd2 status

no such service
0
 
LVL 12

Expert Comment

by:Kent W
ID: 40310191
Ok, then do a

chkconfig  <enter>

It will list all services.  You can look at apache* / http* and see what the service is named.

Alternately, you can ls -l your /init.d/ directory and find the startup script.  It's name is the name of the service.

I think in OpenSUSE they reside in /etc/init.d  although it may be /etc/rc.d/init.d

Let me know if you still can't find it.
0
 
LVL 12

Expert Comment

by:Kent W
ID: 40310200
Duh, Opensuse has the funky "shortcut".


rcapache2 start
rcapache2 stop


This should work also -

/etc/init.d/apache2 stop/start
0
 
LVL 14

Expert Comment

by:ThomasMcA2
ID: 40310234
You guys are going in circles. The service on openSUSE is called apache2. The OPs responses confirm that apache2, and therefore the Apache server, is not running.

The real question is why/how you can open index.html. What is the complete URL for index.html? Is it using localhost? Or a specific IP?
0
 
LVL 12

Expert Comment

by:Kent W
ID: 40310247
I'm confident the direct
/etc/inid.d/apache2 stop(or start) will work, as will the "OpenSUSE way" of
rcapache2 stop/start

He hasn't tried these yet.  The service is apache2, and I'm not sure why is "service" command isn't seeing it, but that's another issue.
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40310337
Looks like you don't have apache installed but some other web server, can you try this:

# service lighttpd stop

if it is stopping, remove it like this:

# chkconfig --del lighttpd
0
 
LVL 30

Accepted Solution

by:
serialband earned 2000 total points
ID: 40315359
however,
systemctl status apache2.service
works?
If this is OpenSUSE 12 or newer, they've moved on to systemd.  The checkconfig and service commands generally won't do anything unless you did an upgrade over the older Suse11 system and it did a conversion of the init files.  They should also prompt you that init scripts are deprecated and to use systemd.  You should be using systemctl starting from OpenSUSE 12 to manage services.  That's probably why you're seeing confusing results trying to run servicecheckcofig and nothing's happening.  From what I remember, the init scripts should be stubs that actually call systemd, if you did an upgrade of your old OpenSUSE 11.  You may not have any init scripts if you started from scratch.

Don't have 2 sets of startup scripts.  You'll forget something and it'll be in disarray.

You'll need to learn systemd.
systemctl start apache2.service
systemctl stop apache2.service
man systemctl
0
 

Author Comment

by:Nusrat Nuriyev
ID: 40316326
Yes, I use newer OpenSuse 13.1
0

Featured Post

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The biggest nightmare for any Exchange Server Administrator is to keep the server running without any issue. But the problems often come and they need to be resolved efficiently and timely. Here are important troubleshooting points: Define the Pr…
I didn’t use eM Client for long when I decided to swap to Outlook 2016. The reason for the switch is that it started asking for payment to continue some of its services after one month.   The problems I faced when I didn’t pay were:   I was not …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question