• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

I am hosting my own html file as example.com in apache webserver, but example.com shows other page.

shivajikobardan

Active Coder
I am doing IP based virtual web hosting.

This is the edited part of configuration file-:

Code:
Listen 80


<VirtualHost *:80>
    DocumentRoot "C:\Apache24\htdocs\eg1"
    ServerName www.example.com

    # Other directives here
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:\Apache24\htdocs\eg2"
    ServerName www.example.org

    # Other directives here
</VirtualHost>

eg1 and eg2 are the folders where the respective html files exist.
I genuinely don't understand why is this happening. server is showing no problems. Please help
 

Johna

HTML, CSS and JS Coder
Staff Team
Guardian
Are you actually using the domain example.com or another domain that you don't want to show?
 

Johna

HTML, CSS and JS Coder
Staff Team
Guardian
Do you own this domains? Because you can't just host your own website on any random domain if you don't own it.
 
Top