Your localhost configurations (unless changed in the vhosts file
) are contained in the httpd.conf file, which you can check out for reference, and is why the .htaccess file can be accessed on localhost.
Add this to the <Directory> directive just below the Options
list, which you have omitted, but would perhaps need to be added at some later stage:
Options Indexes +FollowSymLinks Includes ExecCGI
Allow from all
CustomLog logs/example_com_access.log common
Adding AllowOverride All
will permit .htaccess files to be parsed by the server on a directory by directory basis.http://httpd.apache.org/docs/2.2/howto/htaccess.htmlhttp://httpd.apache.org/docs/2.3/mod/co ... owoverride
Also note the error and access log entries have been edited as the dot may give issues.
This is incorrect<VirtualHost _default_:80>
and should be:<VirtualHost *:80>
which must match the NameVirtualHost *:80
We are using an IP wild card *
A reference quote from this link:http://httpd.apache.org/docs/2.3/mod/co ... irtualhost
Argument to <VirtualHost> directive
Note that the argument to the <VirtualHost> directive must exactly match the argument to the NameVirtualHost directive.