httpd server service location? - apache

Following is not working.
/etc/init.d https restart
serive httpd restart
I don't see any file related to httpd in /etc/init.d
Although httpd server is running fine. httpd.conf file is also not present in /etc.
where should i look?
Please help in restarting the service.

Can you specify which distro you are using?
Ubuntu 12.04LTS: service apache2 restart
Debian 6: service apache2 restart
Redhat: /sbin/service httpd restart

Centos 7:
/etc/systemd/system/multi-user.target.wants/httpd.service
Which points to:
/usr/lib/systemd/system/httpd.service

Related

How to use httpd command instead of apache2 on Ubuntu?

Is there a way to create httpd as an alias on Ubuntu that points to apache2? I'd like to be able to use the systemctl reload httpd and systemctl reload apache2 commands interchangeably, since I often use both CentOS and Ubuntu.

Can't start XAMPP web server after Apache2 started

I'm using Ubuntu 20.04, I have Apache2 web server installed (it uses 80 for HTTP and 443 for HTTPS) and I also have XAMPP installed (Apache web server running on 8012 for HTTP and 4431 for HTTPS). So the question is, why if I do
$ sudo ./lampp start
$ sudo systemctl start apache2
everything is fine and both web servers start. But if I do
$ sudo systemctl start apache2
$ sudo ./lampp start
the XAMPP web server does not start?
This question is similar to this one, but in the answers there is no explaination about why this happens.

Amazon EC2 hide phpmyadmin route [duplicate]

I am wondering how to change the default URL for phpMyAdmin. I am using the latest version (4.0.4.1) on my CentOS 6 VPS. I am wanting to change it from /phpmyadmin to something more secure. I am unsure how to do this or where to even find my apache.conf file if there is one?
Thanks!
For ubuntu (i used ubuntu 12.04), the default phpmyadmin apache configuration can be found at /etc/phpmyadmin/apache.conf
You can open it by type sudo nano /etc/phpmyadmin/apache.conf and change the third
Alias /yournewalias /usr/share/phpmyadmin
Do not forget to restart apache service,
sudo service apache2 restart
phpMyAdmin default Apache configuration
Alias /phpmyadmin /usr/share/phpmyadmin
Change that to
phpMyAdmin default Apache configuration
Alias /anyname /usr/share/phpmyadmin
Then make sure to restart Apache
sudo /etc/init.d/apache2 restart
Edit this file
/etc/apache2/conf-available/phpmyadmin.conf
line 3: change the line to be
Alias /whateveryouwant /usr/share/phpmyadmin

How do I configure SSL on Apache on Ubuntu?

I tried to enable SSL on my Apache server on Ubuntu, but when I restart the Apache server it shows the following error:
Syntax error on line 3 of /etc/apache2/sites-enabled/000-default:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
That is complaining about mod_rewrite not your ssl cert.
Try
sudo a2enmod rewrite
sudo service apache2 restart

apache2 same with httpd

I've installed apache2 using apt-get into /etc/apache2.
Later I manually compiled and installed httpd2.4 into /usr/local/apache2/.
I've seen post like: My httpd.conf is empty which says that basically apache2.conf is in current use while httpd.conf is preserved for historic reason.
And before installing httpd, the apache2 works fine.
So my question:
Are Apache2 and httpd the same thing?