How can I set the default Apache landing page for a server running WHM? - apache

I have a server with WHM installed for cPanel accounts. This comes with its own Apache configuration.
If I hit either the domain for this server (without a userdir temp url), or the IP, I get the default Apache landing page (cgi-sys/defaultwebpage.cgi).
I'd like to instead specify a folder on the server that would serve as this landing page/website. How do you modify WHM or the Apache settings to accomplish this (without screwing up WHM/cPanel in the process)?

Since you have mentioned WHM, an easier way to do would be to use the web editor feature provided by WHM itself to custom make the default page instead of the one shipped by cPanel.
Web template editor in WHM can be found in account section.
If needed, this tutorial might help you : https://www.basezap.com/change-cpanel-default-pages/

Related

Correct Apache Configuration And Htaccess

I've just reset my Ubuntu 14.04 LAMP server hosted with digital ocean. Could someone tell me the 'proper' way to do server configuration. My goal is to do everything as clean as possible (and hopefully well structured).
I intend on using the server mainly for programming and data analytics, however I do plan on hosting my website in /var/www/html. I also plan on using letsencrypt/certbot to get an easy SSL. With this in mind, these are the main goals I would like to accomplish:
1) Redirect the website to ALWAYS be served through https AND www.
2) Enable HSTS for the entire website.
3) Enable clean url's (remove .php extensions and what not).
Since I would like all of these properties to be used across the entire website, should the configuration be done inside of the /etc/apache2/ folder? Or should it be done inside of .htaccess?
And if it should be done inside of apache2 configuration, which file should I add it to? And finally, how exactly should it be added? (for example vhost 80/443, inside of a mod_something section, etc).
Thank you in advance, I would appreciate and consider any advice about Apache and htaccess!

How to apply changes to HTML pages on Apache web server

I am trying to update the website hosted on my Apache server (running on Fedora Server).
I tried doing both system restart httpd and system reload httpd, but when I open up a web browser and go to the site's IP address, the changes haven't applied. I viewed the source to confirm that the updated code wasn't there, and indeed the updated code was not there.
It seems like the .htaccess was working, it just hadn't "kicked in" yet I guess. I set the max-age to 10 and the updates applied.

Setup cPanel on CentOS, website not working

I've setup a cPanel server on CentOS. Followed through with all the basic recommended installation options.
I've created an account - mydomain.com.au - and have been able to access the cpanel for that account through WHM.
My server's public IP is 1.2.3.4, I've created an A record in my domain register for www.mydomain.com.au -> 1.2.3.4. This does resolve correctly when checked through ping and mxtoolbox.
However, when I try to access the site www.mydomain.com.au, I get taken to "This web page is not available".
Am I missing something? I haven't setup the cPanel server with DNS hosting/private nameserver as I'm trying to get something basic going first, just a simple hosting account.
I think you have not updated the correct "A" record of your site and due to that you are getting this issues, Please update it correctly and check your domain DNS report at : http://intodns.com/
Check that account's VirtualHost in httpd.conf, maybe it has a wrong IP.
Point the IP address correctly to resolve the issue, if you have DNS clustering enabled and you have WHM access then you can edit it accordingly in WHM or you can contact your support that manages the nameserver's for the domain and ask them to point it.

Integrating liferay tomcat with apache web server

I am trying to integrate the liferay tomcat with apache web server.I successfully integrate the liferay with web server.
Condition:
Life ray deployed on ip say : 10.10.10.70
Apache web server on ip say: 10.10.10.80
I provided all the requirement virtual host requirement in httpd.conf file..and provided the web.server.host in portal-ext.properties file.
Problem: When i run liferay portal i can open it on ip: 10.10.10.70
but when i click on any page link (let say /home)that is present in my portal it moved the request to
10.10.10.80:8080/home instead of 10.10.10.70:8080/home
I want to know how to handle this condition.
Because i dont have any page resource on web server doc folder only contain static css..
You might be a bit more precise what "all the required virtual host settings" are, e.g. what did you configure?
Note that by explicitly configuring hostnames/IP-addresses, you're explicitly overriding the autodetected settings from the request - no matter how you get to your portal, Liferay will generate URLs based on the explicitly configured hostname/port.
What's the point in having an Apache in front and then trying to reach tomcat through the non-apache IP/Port? Typically you might have static resources, rewrites, caches on Apache, so that you'll get different results when you alternatively access tomcat through both URLs.
If you configure Apache to "properly" handle the requests before tomcat sees them, you'll typically not need to configure Liferay at all, because Apache will make the actual hostname that it's requested under available to Tomcat. I'm typically using mod_jk for this and it beautifully handles all the configuration with almost no need to explicitly configure tomcat/liferay. If you don't like this, keep in mind that you're explicitly configuring Liferay for the virtual host setup - naturally this explicitly configured name is what Liferay uses. It would be weird if the explicit value would not be used, right?

Changing Bugzilla url

I have installed Bugzilla with Apache on a Windows machine. The Bugzilla web application is set to http://localhost but i have to move it to http://localhost/bugzilla . I think that the Apache server must have a configuration file somewhere but i have little experience with it. Anyone had this problem?
You don't necessarily need to reconfigure Apache, but here's how you would do it:
http://httpd.apache.org/docs/current/platform/windows.html
What you do need to change is the urlbase parameter that tells Bugzilla how to form links to other pages. Yours is probably set to http://localhost/ at present; you probably want it to be http://localhost/bugzilla/.
See http://www.bugzilla.org/docs/4.0/en/html/parameters.html for what you can configure.
If you can't get Bugzilla to load at all, look for a file name params.pl and change the value of urlbase manually. You noramally s