Apache2 not reading my conf file - Ask Ubuntu
i'm used apache2 , can running without of headache. time stumbled on problem can't shake off.
on local work nginx have modification on .htaccess
file. installed apache2. both apache2 , nginx use port 80 disabled nginx time being.
i ceated virtual host file under /etc/apache2/sites-available/
, looks this:
<virtualhost *:80> servername dev-my-site.apache serveradmin my-email@gmail.com documentroot /var/www/html/my-site </virtualhost>
basic, should enough, right? there symbolic link in corresponding /etc/apache2/sites-enabled/
pointing conf file. restarted apache , added following entry /etc/hosts
:
127.0.0.1 dev-my-site.apache
from here expect http://dev-my-site.apache
point /var/www/html/my-site/
doesn't. points instead /var/www/html/
default document root apache2, , displays index.html
file sits there.
here result of apache2ctl -s
, supposed list vhosts:
virtualhost configuration: serverroot: "/etc/apache2" main documentroot: "/var/www/html" main errorlog: "/var/log/apache2/error.log" mutex watchdog-callback: using_defaults mutex default: dir="/var/lock/apache2" mechanism=fcntl mutex mpm-accept: using_defaults pidfile: "/var/run/apache2/apache2.pid" define: dump_vhosts define: dump_run_cfg user: name="www-data" id=33 not_used group: name="www-data" id=33 not_used
it seems virtual host not taken account @ all. doing wrong here?
as found answer realized question a duplicate.
to short: nginx not require specific extension configuration files, apache do.
i forgot suffix conf file *.conf
extension, causing file not recognized apache.
thanks henning kockerbeck, put me in right direction.
Comments
Post a Comment