For my web database I am trying to create a webserver so I need to make a conf file. When I try to edit my conf file and save it wont let me and says permission denied. I have already given myself read and write access, but I still don't have access to the edit the file. Here is the link to the resource I am using to set up my webserver : https://github.com/orsenthil/adminer-on-mac
-
Oh and one more thing, at the end of the document that I linked it says to edit hosts under the etc directory, but when I try to access hosts my terminal says that hosts is not a directory – wonderhead Jul 10 '18 at 18:27
-
1Unfortunately, webserver-related questions are off-topic here. Check the [on-topic](https://dba.stackexchange.com/help/on-topic) item in the help center for more info. – Hannah Vernon Jul 10 '18 at 18:48
-
Okay will do, thank you – wonderhead Jul 10 '18 at 18:50
-
Is this related to sql-server, or are you using adminer with another RDMS (MySQL, SQLLite, Oracle, Postgres)? – S3S Jul 10 '18 at 19:27
-
1I am trying to use adminer with mySQL @scsimon – wonderhead Jul 10 '18 at 19:58
1 Answers
I've been working with local web servers and mysql on Mac for over 15 years, so this recommendation is coming from that experience.
OS X updates will destroy your local web development environment every time you do a major OS update... Don't use the built in Apache, PHP and MySQL. Use Homebrew to install independent web server components.
Now to your problems:
/etc/hosts
is a file not a directory. Each line is a separate record. The line they gave 127.0.0.1 apache.local
just means that your local computer will be accessible from http://apache.local
. This hosts file can be used to avoid DNS lookups for any website.
The conf file you are referring to is the Apache VirtualHost file? OS X is very protective about files in etc
. Have you tried sudo? If you change the permissions to your user, Apache may not be able to function.

- 638
- 7
- 17