Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache setup 000-default.conf file

Tags:

apache

I am sure this is a simple one:

I have vagranted up a machine and setup the LAMP, and the IP is configured to 10.0.0.10.

In my Windows machine, I have modified the hosts file and added one entry named as "rsywx_remote". The ping from my Windows machine to my vagrant machine is OK. Load the "rsywx_remote" in browser from my Windows machine is also fine. The connectivity is of no problem.

I then SSH to my vagrant machine and modified the /etc/apache2/sites-enabled/000-default.conf like this:

<VirtualHost 127.0.0.1>
        DocumentRoot "/www/rsywx/web"
        ServerName rsywx_remote
        ServerAlias rsywx_remote

        <Directory "/www/rsywx/web">
                Options FollowSymLinks Indexes
                AllowOverride All
                Order deny,allow
                Allow from 127.0.0.1
                Deny from all
                Require all granted
        </Directory>
</VirtualHost>

Restarted my vagrant Apache service, and it still points to the default page, not the one I expected.

Any hints?

like image 910
TaylorR Avatar asked Jan 29 '14 14:01

TaylorR


People also ask

How do I create a 000-default conf?

In Apache on Ubuntu, all the virtual host configuration files are stored under /etc/apache2/sites-available directory. With the new Apache installation you can find a default virtual host file called 000-default. conf there. We will create a new virtual host configuration file by copying 000-default.

What is the default Apache configuration file?

Apache is configured by placing configuration directives, such as Listen and ServerName , into a configuration file, which will be read by the Apache executable during the startup. The default configuration file is called " httpd. conf " (or " apache2. conf ") in the directory " <APACHE_HOME>\conf ".

Where is my Apache config file?

All the configuration files for Apache are located in /etc/httpd/conf and /etc/httpd/conf. d . The data for websites you'll run with Apache is located in /var/www by default, but you can change that if you want.

What is etc apache2 sites enabled 000-default conf?

The files in /etc/apache2/conf-available are files that an admin is free to create, rename, remove, fill in with proper content, etc. If you have no 000-default.com, just create one.


1 Answers

Try:

<VirtualHost *:80>

That will listen on all addresses

like image 88
mikea Avatar answered Nov 15 '22 10:11

mikea