8/8/2023 0 Comments Mamp server overview researchSo you can use that folder the same as you would on your server – dropping in WordPress files, etc. Then all you need to do is create your directory in the htdocs folder, in my case: sandbox.local – and you can type “sandbox.local” into your browser and it will head directly to that directory. This is your hosts file, from here type in:Īnd then hit Ctrl + x to close the file. conf extension on the end of the file you create.įrom there – open up your Terminal and type in: In this case, I would then save this file as ‘’ into the ‘vhosts’ folder that you created earlier, where you need a. ALSO – I used a directory of ‘sandbox.local’ for this example, you’ll want to change it for whatever you’re calling your site, ex: css-tricks.local, mysite.local, etc. *** the htdocs folder is the default used for MAMP, you can change this in preference, however – if you do so you’ll have to change the directory in this file. Options Indexes FollowSymLinks MultiViews Now open up your text editor and enter this:ĭocumentRoot /Applications/MAMP/htdocs/sandbox.local/ Include /Applications/MAMP/conf/apache/vhosts/*.confįrom there, create a folder in that same apache directory called ‘vhosts’. Navigate to the bottom of the file where it says: “# Section 3: Virtual Hosts”, specifically: “# NameVirtualHost *” Head to your /Applications/MAMP/conf/apache folder, and open the file called: nf in your text editor. So all of my sites, I type in: sitename.local in my browser One of the things I’ve done for a while now is to create virtual hosts so that I can enter a domain into my browser. If it was running as So if you ever open port 8888, think about this ) He get a file in your htdocs folder and runs this command A let’s say cacker finds your server and deiced to have fun. Because if you run apache as a different users as your own account all of your files are always safe.Īn little example: Running as your own user. (i’ve had a lot of time i just got a 502 error because the files had the wrong owner) However in hosting or even server that are accessible to the Internet this is a need. In local testing this can really be a pain. Becasue the user running apache has to have at least read rights and some times write rights on all files in your htdocs folder. I believe the user the apache user runs as also determains the right apache has ( as in read/write). So if i’m wrong on the next bit please correct me. Now i don’t own a mac so don’t have the ability to know if this is the same as on linux but i think it on basic level is. In the video you had a comment about the apache user box.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |