creating virtual hosts does not work properly on Ubuntu 16.04

Clash Royale CLAN TAG#URR8PPP up vote
1
down vote
favorite
i have created a virtual host on my virtual machine.
The Host does not resolves properly.
These are the steps i have done:
- /etc/hosts added 127.0.0.1 example.com
created example.com.conf in sites-available and loaded sexample.com.conf via a2ensite and reloaded apache.
My conf file:
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName example.com
</VirtualHost>
But example.com redirects me to the reals Domain with IP 93.184.216.34.
My /etc/nsswitch.conf file looks like this:
passwd: compat
group: compat
shadow: compat
gshadow: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
My /etc/resolve.conf loks like this:
nameserver 127.0.1.1
search *****.com
networking server virtualbox apache2 dns
add a comment |Â
up vote
1
down vote
favorite
i have created a virtual host on my virtual machine.
The Host does not resolves properly.
These are the steps i have done:
- /etc/hosts added 127.0.0.1 example.com
created example.com.conf in sites-available and loaded sexample.com.conf via a2ensite and reloaded apache.
My conf file:
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName example.com
</VirtualHost>
But example.com redirects me to the reals Domain with IP 93.184.216.34.
My /etc/nsswitch.conf file looks like this:
passwd: compat
group: compat
shadow: compat
gshadow: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
My /etc/resolve.conf loks like this:
nameserver 127.0.1.1
search *****.com
networking server virtualbox apache2 dns
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
i have created a virtual host on my virtual machine.
The Host does not resolves properly.
These are the steps i have done:
- /etc/hosts added 127.0.0.1 example.com
created example.com.conf in sites-available and loaded sexample.com.conf via a2ensite and reloaded apache.
My conf file:
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName example.com
</VirtualHost>
But example.com redirects me to the reals Domain with IP 93.184.216.34.
My /etc/nsswitch.conf file looks like this:
passwd: compat
group: compat
shadow: compat
gshadow: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
My /etc/resolve.conf loks like this:
nameserver 127.0.1.1
search *****.com
networking server virtualbox apache2 dns
i have created a virtual host on my virtual machine.
The Host does not resolves properly.
These are the steps i have done:
- /etc/hosts added 127.0.0.1 example.com
created example.com.conf in sites-available and loaded sexample.com.conf via a2ensite and reloaded apache.
My conf file:
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName example.com
</VirtualHost>
But example.com redirects me to the reals Domain with IP 93.184.216.34.
My /etc/nsswitch.conf file looks like this:
passwd: compat
group: compat
shadow: compat
gshadow: files
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
My /etc/resolve.conf loks like this:
nameserver 127.0.1.1
search *****.com
networking server virtualbox apache2 dns
networking server virtualbox apache2 dns
edited Feb 28 at 15:00
asked Feb 28 at 13:23
bunower
62
62
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
the problem caused because i have to work nehind a proxy.
If you work behind a proxy /etc/hosts does not work.
You have to ignore the hosts in etc/hosts.
The simplest and fastest way to do this is setting up no_proxy in /etc/environment.
To do this edit /etc/environment and add or append no_proxy like : no_proxy= "localhost, 127.0.0.1, example.com" in my case i had to set proxy settings on Firefox aswell.
And restart your machine.
If you want to check your proxy settings you can run following command env | grep proxy.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
the problem caused because i have to work nehind a proxy.
If you work behind a proxy /etc/hosts does not work.
You have to ignore the hosts in etc/hosts.
The simplest and fastest way to do this is setting up no_proxy in /etc/environment.
To do this edit /etc/environment and add or append no_proxy like : no_proxy= "localhost, 127.0.0.1, example.com" in my case i had to set proxy settings on Firefox aswell.
And restart your machine.
If you want to check your proxy settings you can run following command env | grep proxy.
add a comment |Â
up vote
0
down vote
the problem caused because i have to work nehind a proxy.
If you work behind a proxy /etc/hosts does not work.
You have to ignore the hosts in etc/hosts.
The simplest and fastest way to do this is setting up no_proxy in /etc/environment.
To do this edit /etc/environment and add or append no_proxy like : no_proxy= "localhost, 127.0.0.1, example.com" in my case i had to set proxy settings on Firefox aswell.
And restart your machine.
If you want to check your proxy settings you can run following command env | grep proxy.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
the problem caused because i have to work nehind a proxy.
If you work behind a proxy /etc/hosts does not work.
You have to ignore the hosts in etc/hosts.
The simplest and fastest way to do this is setting up no_proxy in /etc/environment.
To do this edit /etc/environment and add or append no_proxy like : no_proxy= "localhost, 127.0.0.1, example.com" in my case i had to set proxy settings on Firefox aswell.
And restart your machine.
If you want to check your proxy settings you can run following command env | grep proxy.
the problem caused because i have to work nehind a proxy.
If you work behind a proxy /etc/hosts does not work.
You have to ignore the hosts in etc/hosts.
The simplest and fastest way to do this is setting up no_proxy in /etc/environment.
To do this edit /etc/environment and add or append no_proxy like : no_proxy= "localhost, 127.0.0.1, example.com" in my case i had to set proxy settings on Firefox aswell.
And restart your machine.
If you want to check your proxy settings you can run following command env | grep proxy.
answered Mar 1 at 14:07
bunower
62
62
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1010656%2fcreating-virtual-hosts-does-not-work-properly-on-ubuntu-16-04%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password