Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : HOSTS file / creating domain



Threaded Mode | Print  

 HOSTS file / creating domain, unreadable host file entries (12 Replies, Read 8699 times)
tobtob
Group: Member
Post Group: Newbie
Posts: 5
Status:
I want to build a site on my local pc and work on it as a development server.
I created a domain and let AMPPS add an entry in the hosts file. The site works fine but ....... now I want to go look at some things on the "live" site. Of course the entry in my HOSTS file won't let me do that because it is properly redirecting to my local dev server.

So....  I go to "Manage Domains" and there is no way to temporarily remove the HOSTS entry without completely deleting the domain. 

OK...... I figure I can just manually comment out the hosts file entry but the entry is not readable in the hosts file . See below.  Is there something wrong with my installation? How can I make it so my host file is readable. 

I don't know if this will come across as readable in the forum..... I'll add it as an image if it's not shown properly.

Here is what the host file looks like:

127.0.0.1      localhost
::1      localhostㄊ㜲〮〮ㄮ眉睷攮敹畢敹灸敲獳挮浯
IP: --   

HOSTS file / creating domain
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : tobtob January 4, 2013, 4:29 pm
I want to build a site on my local pc and work on it as a development server.
I created a domain and let AMPPS add an entry in the hosts file. The site works fine but ....... now I want to go look at some things on the "live" site. Of course the entry in my HOSTS file won't let me do that because it is properly redirecting to my local dev server.

So....  I go to "Manage Domains" and there is no way to temporarily remove the HOSTS entry without completely deleting the domain. 

OK...... I figure I can just manually comment out the hosts file entry but the entry is not readable in the hosts file . See below.  Is there something wrong with my installation? How can I make it so my host file is readable. 

I don't know if this will come across as readable in the forum..... I'll add it as an image if it's not shown properly.

Here is what the host file looks like:

127.0.0.1      localhost
::1      localhostㄊ㜲〮〮ㄮ眉睷攮敹畢敹灸敲獳挮浯


I can't see the image. But I am guessing you are on Mac OS X. Right ?
Use pico or vi editor in the terminal to edit the hosts file.
E.g :
Code
sudo pico /etc/hosts


Comment the line and Save.

If you are on Windows, i doubt it should restrict you to edit file from notepad. Open a ticket if you are still facing a problem. We will look into it.

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

HOSTS file / creating domain
tobtob
Group: Member
Post Group: Newbie
Posts: 5
Status:
I'm running on a windows PC.  Here is an image of what the hosts file looks like after creating a domain: Board Image
IP: --   

HOSTS file / creating domain
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,
Can you open the file in different editor like notepad++ and show us the output ?

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

HOSTS file / creating domain
tobtob
Group: Member
Post Group: Newbie
Posts: 5
Status:
It looks the same in notepad++ to me. I'll attach the file.
IP: --   

HOSTS file / creating domain
tobtob
Group: Member
Post Group: Newbie
Posts: 5
Status:
I'll try again. Upload didn't like the filetype.file attached:
IP: --   

HOSTS file / creating domain
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : tobtob January 4, 2013, 9:01 pm
I'll try again. Upload didn't like the filetype.file attached:


Hi,

Okay. Can you open a ticket. We will look into it.
http://www.ampps.com/support

Edited by tidus : January 5, 2013, 6:28 am

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

HOSTS file / creating domain
ced64k
Group: Member
Post Group: Newbie
Posts: 5
Status:
Hi Tidus,

Just to be sure, with AMPSS on mac, the hosts file need to be edited manually ? I didn't notice at the start because my older domains were created with MAMP.

Thx.
IP: --   

HOSTS file / creating domain
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : ced64k July 30, 2013, 12:27 pm
Hi Tidus,

Just to be sure, with AMPSS on mac, the hosts file need to be edited manually ? I didn't notice at the start because my older domains were created with MAMP.

Thx.


Hi,

No. Ampps will create it for you. But as it can be modified only by root. Ampps will ask for admin password. It will ask twice in fact, one for Apache restart and one for adding an entry to host file.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

HOSTS file / creating domain
ced64k
Group: Member
Post Group: Newbie
Posts: 5
Status:
Strange, it asks me for the root password but the hosts files wasn't modified. If I edit the file manually it works.
IP: --   

HOSTS file / creating domain
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : ced64k July 30, 2013, 12:53 pm
Strange, it asks me for the root password but the hosts files wasn't modified. If I edit the file manually it works.


It ask once or twice ?


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

HOSTS file / creating domain
ced64k
Group: Member
Post Group: Newbie
Posts: 5
Status:
Only once.
IP: --   

HOSTS file / creating domain
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Quote From : ced64k July 30, 2013, 1:00 pm
Only once.


Actually there are many cases. Either that file is used by some other application. Or it may have lock for some other reasons. Or the prompt which you are getting is of Apache.

But yes in the end, if Ampps is not able to add an entry you will have to add it manually.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 30, 2024, 6:00 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.035