I need default configuration for apache 2.4 - apache

I don't have default configuration files for apache2.4, because I accidentally replaced the configuration with old apache 2.2, and it's not compatible and make me can't start apache2 server. I've googled around but can't find complete basic apache2.4 configuration.
Thanks

Related

how to remove "Server:Apache" from response header

We have Apache 2.4.34 on a Red Hat Linux Server and I need to remove Server: Apache from the response header.
Is there any easy way to do that without mod_security?
If we need to do it with mod_security only, I have checked the Apache 2.4 documentation and it appears Apache 2.4 wont come with mod_security by default.
Can any one tell me the detailed steps how to install mod_security on Red Hat Linux?
Does mod_security have to be separate from Apache?
How we can configure or make Apache 2.4 to use mod_security?
Do we just need to configure in httpd.conf the same as we load other modules?

Website default to apache page after upgrading to apache from 2.4.17 to 2.4.25

I've upgrade apache2 in order to take advantage of HTTP2.
But now I get the default Apache Ubuntu page when I try to access any of my websites ! - they are configured in separate vhost files in /etc/apache2/sites-available
For example : https://www.pretty-story.com/
Can someone tell me what could be the cause of this ? It's probably a simple configuration change, but I don't where to look at and I'm in panic mode.

Set AllowOverride ALL on Apache 2.4 as default for domains

I recently updated from Apache 2.2 to Apache 2.4 and noticed my sub-directories on some domains were no longer showing (visiting via http resulted in a blank page). I am 50% confident this has something to do with the switch to default AllowOverride to 'none'.
Where do I set this to ALL so that the sub-directories will display again and is there a universal fix I can use to make it act as Apache 2.2 did or do I need to do it on a domain by domain or even directory by directory basis?
I am on a cPanel server (LAMP) with CentOs.
I think best way its use WHM EA Custom Templates
To create custom template files that affect how cPanel & WHM builds entries for all virtual hosts, perform the following steps:
Create a copy of one or more of the following files:
Apache 2.2 with SSL — /var/cpanel/templates/apache2_2/ssl_vhost.default
Apache 2.4 with SSL — /var/cpanel/templates/apache2_4/ssl_vhost.default
Apache 2.2 without SSL — /var/cpanel/templates/apache2_2/vhost.default
Apache 2.4 without SSL — /var/cpanel/templates/apache2_4/vhost.default
Rename the copied file to one of the following filenames:
vhost.local — Use this filename if you copied the vhost.default file.
ssl_vhost.local — Use this filename if you copied the ssl_vhost.default file.
Edit the *.local files to make the desired changes to your virtual host configuration.
It's easy. After create your custom template
/scripts/rebuildhttpdconf
service httpd restart

mod_proxy with apache tomcat, how do I set it up?

I have my app that serves on localhost:8080. I want to configure things so that it just servers on localhost:80 (or localhost without the port specified). I was told to follow these instructions.
My apache-tomcat that I downloaded is located at /home/myusername/tools/appname/apache-tomcat-6.0.33
I can't find an httpd.conf file in that dir... so I can't make the changes that the above article mentions. I am not sure what to do. I am new to apache/tomcat. Any help would be great!
Those instructions are for apache, which is different from apache's tomcat. What you have (the 6.0.33 thing) is apache's tomcat, which hosts/runs webapps but isn't typically used as a general webserver. You need to download and install apache, then you'll be able to follow those instructions.
You can download the apache webserver here: http://httpd.apache.org/download.cgi
Or if you are using an OS with a package manager, use your OS'es package manager instead.
Typically, the httpd.conf file should be at /etc/apache2/httpd.conf (or /etc/apache/httpd.conf).

setting up mod_jk on the Apache HTTP web server2.2.13

So I'm trying out JSP for the first time. I found a tutorial that details the installation of the tomcat server and the mod_jk Apache module, but it's a bit outdated. Right now, I've got everything installed and the mod_jk.so file in the modules folder, along with the corresponding loadModule line in the httpd.conf file. The tutorial tells me to copy a file called 'workers.propperties' to the apache conf directory and do some changes inside it, but there's no such file in the win32 binary installation. However, there is a file in the zipped source code, but I'm not sure if I should use it.
I have installed JDK1.6.0U17/JRE6.0/Apache HTTPServer2.2.13/Tomcat6.0.20/Mod_JK1.2.28/Vista
First this question: do you actually need Apache HTTP Server for other purposes? If not, just leave it aside and run Tomcat standlone. I've namely seen too often that starters are somehow under the impression that they need both Apache HTTP Server and Apache Tomcat to be able to run JSP's. This is untrue. Just Tomcat is enough. It's a webserver and servlet container in one.