Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8089467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:24:16+00:00 2026-06-05T19:24:16+00:00

I would like to create a virtual host in apache2, but I want it

  • 0

I would like to create a virtual host in apache2, but I want it to place the source files outside the /var/www folder, i.e. I need to include another document root in the config files, but I implemented it by editing the apache/sites-available/default file, but I know its not the right way to implement, can any one suggest the correct way of implementing it?

with thank and regards,

bala

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:24:17+00:00Added an answer on June 5, 2026 at 7:24 pm

    You can create a new file (e.g. myvirtualhost) in the sites-available folder and then create a symlink in the sites-enabled. The file and the symlink can have any name.

    Inside the new file you create a new virtual host definition:

    <VirtualHost *:80>
        DocumentRoot /path/to/your/webapplication
        ServerName abc.local
    </VirtualHost>
    

    If you are deploying your application only locally for testing it is enough to set the server name to a .local domain (e.g abc.local) in this case you should edit the /etc/hosts file and add a new line like.

    127.0.0.1 abc.local
    

    If you want to make the new virtual host available on the internet you need to make sure that you have registered a valid DNS name with your provider (e.g. webapplication.mydomain.com).

    Basically thats it. You may however want to add some directives to the virtual host definition to control access to your resources.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a virtual table with a similar syntax SELECT 'sk:
Just something I'd like to play with, I would like to create a virtual
I would like to know if it possible to create a virtual directory directly
I would like to know if it possible to create a virtual directory in
I want to create a SQL-like interface for a special data source which I
Hi I would like to create a virtual directory at http://localhost Its just a
I would like to create Java applications, but my first brake is that it
I would like to create a virtual drive for windows. I'm not looking to
I would like to create/add a virtual network adapter to a client operating system
I want to create thread or process that would have its own virtual address

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.