• Contact Editorial Team
  • Advertise on YNOT
  • Submit PR
Thursday, March 12, 2026
  • Login
  • Register
YNOT
  • Home
  • Industry News
    • Porn Star & Adult Talent News
    • Adult Business News
    • Adult Novelty News
    • Adult Industry Legal News
    • Tech News for Adult Webmasters
    • Video Game News for Adults
    • EU News
  • PR Wire
  • Podcasts
  • Industry Guides
  • Newsletters
No Result
View All Result
  • Home
  • Industry News
    • Porn Star & Adult Talent News
    • Adult Business News
    • Adult Novelty News
    • Adult Industry Legal News
    • Tech News for Adult Webmasters
    • Video Game News for Adults
    • EU News
  • PR Wire
  • Podcasts
  • Industry Guides
  • Newsletters
No Result
View All Result
YNOT
No Result
View All Result
Home YNOT Features YNOT University

Create a site with WordPress: Configuring Apache for Virtual Hosts

admin by admin
February 7, 2011
in YNOT University
491
SHARES
Share on FacebookShare on Twitter

YNOT – The previous article showed how to set up the Apache rewrite module so as to enable WordPress to change the URLs of the pages the CMS creates.

This article is dedicated to all those intending to implement several versions of the same website or more than one website. In this case, you will need to set up what are called “virtual hosts.” Virtual hosts run as if they are independent instances of the server, but all operate on a single Apache installation.

We can reduce the virtual host creation process to two simple steps to be repeated for the number of sites that we operate on the same PC.

Step 1: To allow Apache to distinguish between different versions of the same site, you must set a unique name for each version. Locally, we can choose whatever name we like, even if that won’t be the name of the site when you finally make it live on the web. If we wanted to create a site called www.sitodiprova.com, we could choose a name like local.sitodiprova.com, replacing the www prefix in the original with the “local” string in the trial site.

At this point you will need to communicate the name you have chosen to the operating system. When you type the address of a website in the navigation bar of a web browser, the browser queries the DNS (Dynamic Naming System) server network to identify the site. Before querying the DNS, a search is made on a file inside the operating system that is identified as the hosts file. Only if the name you seek matches an IP address in this file is the server queried. In our case, we will modify the hosts file to tell it that if we try to find local.sitodiprova.com, the browser should look in our local PC itself, and not on the web.

With Notepad (or any other plain-text editor), open the file hosts. You should find it in this path: C:\windows\system32\drivers\etc\. At the end of the file, add the line 127.0.0.1 local.sitodiprova.com. If you wish to add more than one local site, add one similar line for each site, changing name each time. For example, you could add lines for local.sitodiprova.com, local.domain2.com and local.myfave.com. Each one will be “mapped” to 127.0.0.1, which is your local machine’s IP address.

Step 2: Now you must set the Apache httpd.conf file to recognize the new site. Open the file (as described in the previous article) and paste the following lines at the bottom:
[PHP]
NameVirtualHost 127.0.0.1


DocumentRoot “C:\wamp\www”
ServerName localhost


DocumentRoot “C:\wamp\www\sitodiprova.com”
ServerName local.sitodiprova.com
ErrorLog logs/sitodiprova_error.log

[/PHP]
After editing, save the file. You will notice that beyond the basic localhost Apache, we created a folder inside the www the location where Apache will look for the file when you type local.sitodoprova.com into your browser. You also have created a folder where error logs for the webserver will be kept.

Important: For proper operation, you must create the folder sitodiprova.com in the path C:\wamp\www\.

If you followed all the steps correctly, you have successfully created your first virtual host. To test its operation, create a file called phpinfo.php in the folder C:\wamp\www\sitodiprova.com. The file should contain only the following string:
[PHP]

[/PHP]
Now type [URL]http://local.sitodiprovacom/phpinfo.php[/URL] in your browser. If you get a PHP information page, you have completed all the steps in the right way.

In future articles, we will see how to configure MySQL and phpMyAdmin to set up the database installation for WordPress.

This article was written for YNOT.com by Eng. Antonio Lodesani. For more information, visit ingoccupati.blogspot.com (in Italian).

Share196Tweet123
admin

admin

YNOT Admin wields his absolute power without mercy. When he's not busy banning spam comments to hell he enjoys petting bunnies and eating peanut butter. He recommends everyone try the YNOT Mail (ynotmail.com) email marketing platform and avoid giving their money to mainstream services that hate adult companies.

Related Posts

Adult Business News

UK Online Safety Act Cuts Pornhub Traffic 36% as Age Verification Takes Effect

December 13, 2025
Adult Business News

The Cambassador: Lindsey Banks, Flirt4Free and Brand Representation

September 5, 2018
Adult Business News

ImLive’s Mere Menezes Siqueira Manages Models, Makes the Machine Work

August 23, 2018
Corey Silverstein of Adult.law
Adult Business News

Silverstein Says: 3 Legal Issues Cam Companies, Models Must Pay Attention To

August 22, 2018
Load More

SPONSOR

INDUSTRY EVENTS

Currently Playing

YNOT Summit Model Track: Nerds Dig Sexy Gamers

YNOT Summit Model Track: Nerds Dig Sexy Gamers

01:05:46

YNOT Summit Webmaster Track: Understanding Webcam Business Models

00:51:11

YNOT Summit Model Track: Cam Law 101

01:26:24

SPONSOR

POPULAR NEWS

JuicyAds Marks “20 Years of Powering the Adult Industry’s Advertising Economy”

JuicyAds Marks “20 Years of Powering the Adult Industry’s Advertising Economy”

March 11, 2026
Bella Bare Signs with Star Factory PR

Bella Bare Signs with Star Factory PR

March 11, 2026
Nalpac, Entrenue Set to Exhibit at Altitude Intimates in Las Vegas

Nalpac, Entrenue Set to Exhibit at Altitude Intimates in Las Vegas

March 11, 2026

Sponsor

YNOT YNOT

QUICK LINKS:

  • About YNOT
  • Terms of Use
  • Privacy Policy
  • Editorial Team
  • Advertise on YNOT
  • Sitemap

FRIENDS OF YNOT:

  • Best Adult Cams
  • Live Porn
  • Adult Reviews
  • Adult Email Marketing
  • Discounted Porn
  • vr porn sites
  • European Adult Biz Magazine

FRIENDS OF YNOT:

  • Rabbits Reviews
  • XXX Job Interviews
  • Adult Site Broker
  • Femdom
  • Paid Porn Sites
  • Live Sex
  • Cam girl sites
  • AI Girlfriend
  • live porn Vibra Game

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Home
  • Adult Business News
  • Adult Industry Legal News
  • Adult Novelty News
  • Porn Star & Adult Talent News
  • Tech News for Adult Webmasters
  • Video Game News for Adults
  • Interviews
  • Opinions
  • YNOT Industry Wire
  • Newsletters

Copyright © 2026 YNOT Group LLC.

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.