php - New vhost with Apache2 + Vagrant -


i'm trying create new vhost in apache2. runs in vm through vagrant.

i have placed directory wp installation in /vagrant/ (/vagrant/example/). consequently, create new vhost apache2 way:

sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/example.com sudo nano /etc/apache2/sites-available/example.com 

inside example.com, have this. aware i've changed port 80 2345, access localhost:2345:

<virtualhost *:2345>     serveradmin webmaster@localhost      documentroot /vagrant/example/     <directory />             options followsymlinks             allowoverride none     </directory>     <directory /www/var/>             options indexes followsymlinks multiviews             allowoverride none             order allow,deny             allow     </directory>      scriptalias /cgi-bin/ /usr/lib/cgi-bin/     <directory "/usr/lib/cgi-bin">             allowoverride none             options +execcgi -multiviews +symlinksifownermatch             order allow,deny             allow     </directory>      errorlog ${apache_log_dir}/error.log      # possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     loglevel warn      customlog ${apache_log_dir}/access.log combined </virtualhost> 

afterwards:

sudo a2ensite example.com sudo service apache2 reload sudo service apache2 restart 

and finally, in vagrantfile add line:

config.vm.network :forwarded_port, guest: 2345, host: 2345 

i make:

vagrant reload vagrant ssh 

but, when try localhost:2345/wp-admin/install.php doesn't work. can't access.

any suggestion?


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -