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

Problems with the Windows version of XAMPP, questions, comments, and anything related.

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

Postby userapache123 » 13. June 2021 06:00

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?
userapache123
 
Posts: 14
Joined: 06. May 2021 06:01
XAMPP version: xampp-windows-x64-7.4.16-0-VC1
Operating System: Windows

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

Postby Altrea » 13. June 2021 08:15

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)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11935
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 142 guests