Nusrat Nuriyev
asked on
Turn off apache
Hi, I want to turn off apache on openSUSE.
ASKER
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
How to find httpd.conf
Where is it?
OpenSUSE 13.11
ASKER
also how to install locate?
why "zypper in locate" can't locate "locate" package?
why "zypper in locate" can't locate "locate" package?
ASKER
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?
What is the difference between them to? why it installs lighttpd when I install httpd?
Configuration files and location of files is httpd.conf ..But the service runs is called as apache2
ASKER
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?
I know that httpd.conf is conf files. Where it should be?
ASKER
installation:
yast2 -i apache2
startup:
systemctl restart apach2.service
yast2 -i apache2
startup:
systemctl restart apach2.service
ASKER
why service apache2 start says that
"service: no such service apache2"?
"service: no such service apache2"?
On my openSUSE 13.1, ps ax | grep "apache" returns this:
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
~ $ 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
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
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.
# 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.
ASKER
why service apache2 start says that
"service: no such service apache2"?
however,
systemctl status apache2.service
works?
"service: no such service apache2"?
however,
systemctl status apache2.service
works?
Looks like your service is called "apache2.service", can you try:
service apache2.service status
service apache2.service status
ASKER
Gerwin, nope.
service apache2.service status
doesn't work
service apache2.service status
doesn't work
Your service is actually called httpd2
service httpd2 status
chkconfig httpd2 off
will turn it off on bootup
service httpd2 status
chkconfig httpd2 off
will turn it off on bootup
ASKER
mugojava, nope.
service httpd2 status
no such service
service httpd2 status
no such service
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.
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.
Duh, Opensuse has the funky "shortcut".
rcapache2 start
rcapache2 stop
This should work also -
/etc/init.d/apache2 stop/start
rcapache2 start
rcapache2 stop
This should work also -
/etc/init.d/apache2 stop/start
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?
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?
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.
/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.
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
# service lighttpd stop
if it is stopping, remove it like this:
# chkconfig --del lighttpd
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, I use newer OpenSuse 13.1
ASKER
ps ax | grep "http"
ps ax | grep "apache"