linux - Access server using Browser and IP instead of DNS -


i want access test site home using firefox , entering ip instead of dns.

my server aws ubuntu , has mysql, apache2 installed.

i want access test site in firefox: x.x.x.x/test

but showed me 404.

when type in firefox works fine: x.x.x.x

i have no idea how make work.

here's did in server.

cd /var/www sudo mkdir test sudo cp wordpress test/ cd test sudo mv -r test public sudo chown -r www-data:www-data public sudo chmod -r 775 public cd /etc/apache2/sites-available sudo cp 000-default.conf test.conf sudo vim test.conf 

here test.conf

<virtualhost *:80>     servername test     serveradmin webmaster@localhost     documentroot /var/www/test/public     <directory /var/www/test/public/>         allowoverride     </directory> </virtualhost> 

here goes command again

sudo a2ensite test.conf sudo service apache2 restart 

now goto firefox , enter aws elastic ip in address bar this:

x.x.x.x/test 

which gives me 404

you doing mistake in document root. change apache configuration below , restart apache x.x.x.x/test work or type url x.x.x.x/test/public in browser.

<virtualhost *:80>     servername x.x.x.x     serveradmin webmaster@localhost     documentroot /var/www/test     <directory /var/www/test>         allowoverride     </directory> </virtualhost> 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -