What you need to do in a terminal (as root) is find the apps conf file then edit the conf file for the app:
{{Code|Code= su-[enter password] ls /etc/httpd/conf.d}}
:: ''NOTE:'' If you get a message like ''"ls: cannot access /etc/httpd/conf.d: No such file or directory"'', simply use the following to manually change directories:
{{Code|Code= cd /etc cd httpd cd conf.d ls}}
Find your app .conf file. It will look like 10##-yourwebappname.conf
{{Code|Code= nano /etc/httpd/conf.d/10##-yourwebappname.conf}}
:: ''NOTE:'' Depending on the options you chose during installation, you may not have the "nano" text editor installed. If that is the case, you will receive an error message. Instead, substitute "vi" for "nano" to use a different text editor. [http://www.cs.colostate.edu/helpdocs/vi.html Here are the commands to use the "vi" editor.]
Your conf file should look something like this at the top of the page:
{{Text|<pre>
<VirtualHost *:80>
ServerName app
ServerAlias app.YourDomain.lan
</VirtualHost></pre>}}
Add this (immediately after the ServerName directive):
{{Text|<pre>
ServerAlias username.yourhda.com
}}</pre>
So it looks like this:
{{Text|<pre>
<VirtualHost *:80>
ServerName app
ServerAlias username.yourhda.com
</VirtualHost>
}}</pre>
You can add more server aliases if you want to access the app under those names (for example: ServerAlias myphotos.DomainName.com). Once you are satisfied with the server aliases, you may save and quit nano by following these steps in Windows:
Restart the server using:
* Fedora
{{Code| systemctl restart httpd.service httpd reload}}
* Ubuntu
{{Code| sudo service apache2 reload}}
And you are done, enjoy your website.... or are you?
So suppose I have a domain name, which is pointed at my hda - and I set up a subdomain that for the mediawiki app. We'll call it mediawiki.myname.com.
After installing media wiki, I need to go
{{Code| sudo vi /var/hda/web-apps/mediawiki/html/LocalSettings.php}}
And scroll down to
{{Code|<pre>
## The protocol and server name to use in fully-qualified URLs
$wgServer <nowiki>=</nowiki> "http://mediawiki";
}}</pre>
then change to
{{Code|<pre>
$wgServer <nowiki>=</nowiki> "http://mediawiki.myname. com";
}}</pre>
then enter these commands:
{{code| sudo rm -r /etc/lock/apache2 sudo php /var/hda/web-apps/mediawiki/html/maintenance/Update.php sudo service apache2 restart}}
Now you should be able to view http://mediawiki.myname.com from inside your network and on the internet as well.