Changing root of apache2 is not working - apache

I tried to change the root directory of my apache2 server on my Ubuntu by following the instructions provided in this answer But its showing a 403 error. Can anyone guide me through.

Related

M1 BigSur httpd error LaunchAgents/homebrew.mxcl.httpd.plist

I am a bit confused that Apache httpd.conf not in the /usr/local/etc/ anymore, because there is no visible etc/ folder in the local. It's being empty. So did a bit search and found the a httpd.conf in the /etc/apache2/httpd.conf not very sure it is the right file, because it looks bit different. Anyway the below issue started after loading brew install httpd
httpd error LaunchAgents/homebrew.mxcl.httpd.plist
when I use the command brew services start httpd it gives the message of ==> Successfully started httpd (label: homebrew.mxcl.httpd) but when I check the services list I see the httpd error. And when I try to reach localhost I see It works message but when I refresh the page no more It works message and I only see the localhost refused to connect.
what is the correct way to install and run the apache?

How can "localhost" give an answer when apache2 is not installed?

My apache2 configuration is driving me crazy, and since I'm new to Linux/Ubuntu (16.04) and servers, I've been trying to install/remove lamp (and also xampp, and also phpmyadmin) a great number of times now, with several methods... without much results.
However, my current configuration is :
mysql-server is installed, and I can connect with 'mysql -u root -p'
phpmyadmin : I have tried to reinstall it, but there was a problem with apache2 (could not reload it or something... I haven't figured it yet)
php7 is installed and has been working until my server has crashed (I haven't tried to remove it)
apache2 : I used to have a lamp configuration + XAMPP (lampp in /opt/), but since there has been a problem, I uninstalled XAMPP and recently I also unistalled apache2 (sudo apt-get purge apache2, sudo apt-get autoremove, sudo apt-get clean and I verified that the configuration files have been deleted).
When I still had apache2, I finally had this problem : when opening "localhost" on Firefox, it was showing :
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /
on this server.<br>
</p>
<p>Additionally, a 403 Forbidden
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>
My main question for this post now :
Since I have deleted Apache2, "localhost" should not be working at all now on my browser (Firefox)... However, I still get the exact same page ?! Do you know why / can help me ?
Thanks a lot in advance to all who can help me, either to understand my problem better (so that I know a bit more where/how to search for answers), or to solve my problem (and help me work on my website again ^^) !
Have you already stopped Apache via systemctl? Something like sudo service stop apache2 (or is it sudo service apache2 stop), will stop the server from running. Even though you have uninstalled everything, the server process will still run if you haven't stopped it.

How to completely remove Apache from Ubuntu 16.04 LTS

I have tried all the steps in the given in the AskUbuntu forums but all in vain.I removed entire LAMP Stack as well.But Apache2 Ubuntu Default Page loads up.I want to shift to Nginx and try and test my website on to that first.
AskUbuntu Solutions: https://askubuntu.com/questions/50101/how-do-i-remove-the-lamp-stack-so-i-can-start-over
https://askubuntu.com/questions/176964/permanently-removing-apache2
Any help is greatly appreciated.
Thanks!
In my case it was because the god damn index file was left in the /var/www directory. So the NGINX was running though it showed the apache html file :) So once I removed index.html from the directory it showed the correct one.

Tomcat interfering with other website in public_html

I am trying to install Islandora on an server running both drupal and Fedora. Fedora runs on Tomcat, which seems to take of the public_html directory.
I believe it is related to this link:
http://www.coderanch.com/t/530321/Tomcat/SOLVED-Tomcat-subdirectory-mapping-WWW
Fedora is running fine, but when I try to run Drupal I get a error:
HTTP Status 404 - /drupal
type Status report
message /drupal
description The requested resource is not available.
Apache Tomcat/7.0.56
Guidance would be great. Thanks for the help.

Apache httpd is not restarting in centos

I install Zend server CE 5.6. With that Apache is installed automatically. Now I want to restart Apache server then it is showing error
click here for image to see exact error
any help
why i cannot restart apache httpd service.....?
Well you got some syntax error in httpd.conf and zedserver_php.conf.
For libphp5.so, check if the user apache can access to usr/local/zend/lib/apache2/libphp5.so.
First look, I think you have some error in httpd.conf and zedserver_php.conf and that apache can't access to httpd.conf and zedserver_php.conf.