VirtualHost and Images Not Found

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

VirtualHost and Images Not Found

Postby toddzetlan » 15. March 2018 02:41

I am brand new to XAMPP. I have version 7.2.2 installed under Windows 10. I have also installed WordPress by creating a folder under htdocs and extracting WordPress version 4.9.4 to this folder. For example sake, let's assume the folder under htdocs is named test. After going through the install for WordPress and confirming that it is working, I also setup a URL through no-ip.com and direct my port 80 traffic to this Windows 10 machine. This is all working. Lastly, I was trying to configure VirtualHost entries. Let's assume the external URL is test.hopto.org. Traffic is being routed appropriately, but all images and style sheets are not loading appropriately. It appears that the images and style sheets are being written as http://localhost/test/wp-content/themes/twentyseventeen/assets/images/header.jpg instead of http://test.hopto.org/wp-content/themes/twentyseventeen/assets/images/header.jpg. Because I am new to this, I am not sure what I am missing. Here is what my VirtualHost entry looks like:

Code: Select all
<VirtualHost *:80>
    DocumentRoot "c:\xampp\htdocs\test"
    ServerName test.hopto.org
    ServerAlias test.hopto.org
</VirtualHost>


What configuration point am I missing? Thanks for you assistance.
toddzetlan
 
Posts: 2
Joined: 15. March 2018 02:06
XAMPP version: 3.2.2
Operating System: Windows 10

Re: VirtualHost and Images Not Found

Postby Altrea » 15. March 2018 10:08

Wordpress sets a configuration for the base url in its installation.
So either reinstall wordpress from the new url or change that base url.

Wordpress has a guide on how to migrate a wordpress installation to a new url
https://codex.wordpress.org/Moving_WordPress
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: 9366
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: VirtualHost and Images Not Found

Postby toddzetlan » 15. March 2018 12:36

Thank you. I will try this tonight. I appreciate your assistance.
toddzetlan
 
Posts: 2
Joined: 15. March 2018 02:06
XAMPP version: 3.2.2
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 48 guests