Hosting personal pages over a Redmine installation - apache

I currently installed redmine on my server, and configured apache2 to run it in a virtualhost over mydomain.com
Thing is I also want to host some extra pages, at mydomain.com/personal, but since redmine is running the page is never found. How can I override this configuration to run both redmine and some personal pages?

You need the Alias directive to just create a virtual directory, which maps /public with some other real directory on the filesystem.

Related

Domain Name cannot be changed in Apache on CentOS 7

I have set up a server with a wiki and Wordpress and Nextcloud on a new Domain, let's say it's testing.com. When I was finished, I wanted to change the Domain from testing.com to realdomain.com.
The server is running CentOS 7 with httpd (apache), so I changed the ServerName in /etc/httpd/conf/ to "realdomain.com". Then I changed the VirtualHosts in all the files in /etc/httpd/conf.d.
I added the new Domain to the trusted Domains of the Wordpress, Nextcloud and wiki. I restarted the httpd service and the server itself.
Yet, when I open realdomain.com in browser, it shows me my websites, but it puts testing.com in the address field.
I tried using mod_rewrite to change the URL, but then my webbrowser tells me that the site doesnt redirect correctly and that the redirects never stop.
I tried those rewrite rules in the .conf files and in the .htaccess (not simultaneously)- no success.
I removed all my files in conf.d and created a new DocumentRoot with a simple helloWorld.html - The Url still gets rewritten to testing.com.
Are there any other locations that could have rewrite rules? Did I miss anything?
Thank you so much in advance, this is killing me!

Domain for main document root gets pointed to newly enabled subdomain document root

I have a Ubuntu 16.04 which apache2 server is running. I have a website hosted in my primary domain which the document root is /var/www/html.
I use Webmin to create a subdomain and I have given the document root as /var/www/mysite.
when I restart the server and visit the main domain, it shows the website that I hosted in the /var/www/mysite, which is the subdomain document root.
If I remove or rename the conf file under /etc/apache2/sites-available/{created-subdomain.conf} file, the main domain again shows the website hosted in the /var/www/html document root.
What are the possible causes for this. I want my main domain to show the website I hosted in /var/www/html and subdomain to show the website I placed in /var/www/mysite
Sounds like you're not setting up ServerName domain.com in your configs, so Apache simply chooses the first one (alphabetically by Config file name) to serve.

How do I make the Apache Server point to the /var/www/html directory

In a new RHEL 7.5 server, I have created a var directory and within that the /www/html directory in which my website resides. When I try to access the website, I get the Apache Server Test page and mentions that the Apache server is running and I need to point to the /var/www/html directory.
How do I point the Apache Server to the /var/www/html directory?
You need to configure the available-sites and enabled-sites and remember to restart apache after changes in the config files.
Have a look at this guide:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts#step-four-%E2%80%94-create-new-virtual-host-files

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

WAMP localhost and phpmyadmin setup

I have inherited a WAMP setup, but needed my http://localhost to point to a different directory "C:/Users/[user.name]/htdocs" due to many dependencies.
I made the following changes in httpd.conf
DocumentRoot "C:/Users/[user.name]/htdocs"
<Directory "C:/Users/[user.name]/htdocs">
where the original path was "c:/wamp/www/"
Now the WAMP default path for phpMyAdmin http://localhost/phpMyAdmin is not working anymore.
Is it possible to fix that via either C:\wamp\alias\phpmyadmin.conf or httpd-vhosts.conf somehow?
Can I suggest a better solution to your requirement to have a site running that does not live in the WAMPServer default location i.e. \wamp\www or \wamp\www\somefolder
If you revert all your httpd.conf changes to the out of the box state and then create a Virtual Host to run the site you have located in your \user.... folder.
Virtual Hosts are a standard Apache feature that allows you to run may sites from a single instance of Apache, a bit like a shared hosting package setup.
You would then have the benefits of the WAMPServer homepage running on localhost and all the other alias's tools as well.
You can then run your site using a nice url for example sitename.dev and the virtual host definition also allows you to setup any site specific requirements without effecting any other site you may want to run.
There is a HowTo Setup Virtual Hosts here on SO