Page 1 of 1

Use http://myfakedomain.org instead of http://mymachine:8082

PostPosted: 13. June 2021 06:00
by userapache123
What do I need to do to make all the wiki pages being served from (fake domain with http) of http://myfakedomain.org (instead of http://mymachinename:8082)?

I want to test it out till I purchase the real certificate and domain. I want to figure out what changes need to be made to make it happen.

In other words, instead of all the URLs starting as:

http://mymachinename:8082/mywiki/index.php/Main_Page/

I want all the URLs to start as:

http://myfakedomain.org/mywiki/index.php/Main_Page/

I am using in Windows server:

MediaWiki 1.35.2
Apache 2.4.47 Win64 from Xampp
mysql-8.0.23-winx64 (MySQL :: Download MySQL Community Server)
PHP 7.4.3 (from Xampp)


The Xampp seems to have httpd-vhosts in two places, which are:

D:\Xampp\apache\conf\original\extra\httpd-vhosts

and

D:\Xampp\apache\conf\extra\httpd-vhosts.conf


I assume D:\Xampp\apache\conf\extra\httpd-vhosts.conf is the file that I need to edit.

In the D:\Xampp\apache\conf\extra\httpd-vhosts.conf file, I have added entry as:

<VirtualHost *:8082>
DocumentRoot "D:/Xampp/htdocs/mywikiaocwiki"
ServerName mymachine:8082
ServerAlias myfakedomain.org
</VirtualHost>

In httpd.conf, my current setting is:
ServerName=mymachinename:8082
ServerAlias myfakedomain.org

In LocalSettings.php, I have:

$wgServer = "http://myfakedomain.org";


With the above settings, my web page does not get served from http://myfakedomain.org.

What changes, or additional settings do I need?

Re: Use http://myfakedomain.org instead of http://mymachine:

PostPosted: 13. June 2021 08:15
by Altrea
Your Apache needs to run in port 80 If you warnt to get rid of the port in the http url.
There ist no was aroind that.

If Apache ist running in port 80 you can define a virtual host for your fake domain. This and the hosts entry will do the job (at least If the request ist coming from the same computer xampp is running on)