But if the site runs on an Ubuntu server, doesn’t that mean it is remote to your Mac, and if you have no WiFi, how can you then communicate with it? This is why the question was confusing.
> On 15 Dec 2016, at 1:11 PM, Jaqen Nki <[email protected]> wrote: > > yeah i meant using the ubuntu server as normal to serve the website to my mac > locally, so its still behaving as a real website, without the net though. > as now my apache server is configured to serve multiple sites with multiple > vhosts. each one has its own domain. site1.me <http://site1.me/> is my main > project. id like to make site0.me <http://site0.me/> a clone of site1.me > <http://site1.me/> thats served to my mac locally. > > /etc/hosts on mac: > > ## > 127.0.0.1 localhost > 255.255.255.255 broadcasthost > ::1 localhost > > > 10.231.208.199 site1.me <http://site1.me/> http://site1.me > <http://site1.me/> > 192.168.1.20 flask0.me <http://flask0.me/> http://flask0.me > <http://flask0.me/> > 192.168.1.20 dsite1.me <http://dsite1.me/> http://dsite1.me > <http://dsite1.me/> > 192.168.1.20 forum1.me <http://forum1.me/> http://forum1.me > <http://forum1.me/> You can't have a URL in your /etc/hosts file like that. > so could i set up a vhost for site0.me <http://site0.me/> and give it an ip > like Only thing I can think to tell you is that when you have a VirtualHost, it needs to have the ServerName directive set within the VirtualHost. It is this which dictates that that VirtualHost is applied when a request is received for that host name. In other words, Apache doesn’t care what the IP address was. You could therefore override DNS by adding an manual entry in your /etc/hosts file which mapped: 127.0.0.1 site1.me <http://site1.me/> So you don’t even need to use a separate host name. If you did still want to have a separate host name, then in addition to ServerName in the VirtualHost, add: ServerAlias site0.me <http://site0.me/> Then in the /etc/hosts file add: 127.0.0.1 site0.me <http://site0.me/> So you are leaving site1.me <http://site1.me/> alone, but allowing site0.me <http://site0.me/> as an alias for accessing the same site. Graham > 127.0.0.1 site0.me <http://site0.me/> http://site0.me <http://site0.me/> > > > On Wednesday, December 14, 2016 at 7:03:31 PM UTC-7, Graham Dumpleton wrote: > Am somewhat confused about the question being asked. > > Are you talking about the Apache/mod_wsgi site you had issues with setting up > before? > > You mention both Ubuntu servers and a Mac, so not really sure what you are > asking and how things hang together. > > For local development you are possibly better off not using the main > operating system Apache setup, but use mod_wsgi-express instead. You can run > up your application on a non privileged port from the command line and access > it via localhost. > > See: > > * https://pypi.python.org/pypi/mod_wsgi > <https://pypi.python.org/pypi/mod_wsgi> > > Graham > >> On 15 Dec 2016, at 12:56 PM, Jaqen Nki <proj...@ <>gmail.com >> <http://gmail.com/>> wrote: >> >> hey quick question, how would i configure a site to run on loopback, >> sometimes when traveling dont have wifi 100% of time and would like to still >> be able to develop. would i change my static ip config on ubuntu? which >> currently looks like this: >> >> # /etc/networking/interfaces >> >> # interfaces(5) file used by ifup(8) and ifdown(8) >> auto lo >> iface lo inet loopback >> >> auto enp0s5 >> iface enp0s5 inet static >> address 10.231.208.199 >> netmask 255.255.255.0 >> gateway 10.128.128.128 >> network 10.128.128.0 >> broadcast 10.128.128.255 >> >> # OpenDNS IPv4 nameservers >> dns-nameservers 10.128.128.128 >> >> # OpenDNS IPv6 nameservers >> #dns-nameservers 2620:0:ccc::2 2620:0:ccd::2 >> >> or could i clone a site to run on loopback, and add a separate config for >> that in this same file, so i could access them both while connected and >> offline? >> lastly how would i point my macs /etc/hosts file to serve the ubuntu servers >> localhost? > > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/modwsgi > <https://groups.google.com/group/modwsgi>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
