Where does MAMP keep its web server config file? - macos

I'm using Mac OS X, and I use MAMP for local development.
I want to modify my web server(nginx.conf or .htaccess) configuration, and not sure which one/where MAMP place their web server config.
How do I find out ?
Any hints ?

For MAMP 4.2 the path is: /Applications/MAMP/conf/nginx/nginx.conf

Open Finder and click on the Application Tab, scroll to find the icon shown below:
Then double click this icon to get folder you want.

Just to clarify for future readers using MAMP PRO:
The base config template is located at ./MAMP/conf/nginx/nginx.conf, but the real/final config is located at /Library/Application Support/appsolute/MAMP PRO/conf/nginx.conf
This is the config that includes any of the custom settings for individual Hosts, which might be useful for review/comparison purposes.

For anyone using MAMP PRO 6, according to the logs you can find the actual (non-template) NGINX config file at:
/Library/Application Support/appsolute/MAMP PRO/conf/nginx.conf

Related

Automated Addon, Settings Installation for Firefox with Ansible

I am currently trying to install firefox addons with Ansible.
I found a role for ansible on ansible galaxy, I fixed to work with the latest ansible version (minor python2/3 issue):
Fixed version:
https://github.com/cyborg-x1/ansible-firefox
The Ansible role downloads the xpi file and puts it in the extension folder.
But two issues:
1. Issue
If the .mozilla/firefox/randomString.default-release folder does not exist, it creates it, but then Firefox on the first start creates another directory .mozilla/firefox/randomString.default-release-1 and does not use the directory except selected by profile manager.
2. Issue
The addons are placed in the extension folder, but when starting up they are disabled.
Anoying to do that for > 6 addons.
I tried to to see what changes when I enable the addons by putting a git repo over the ~/.mozilla folder. Multiple files are created the main responsible is a json one where it puts the rights. If I copy that file and just put that in later, it seems NoScript works, but not uMatrix which does not work at all: button with no icon, no reaction when pressing the button.
I also found the way to use /usr/share/mozilla to install addons globally. Problem is, this way, according to documentation, requires to have the addon uid, but that file mentioned (don't recall the name atm) is not present in latest addons of Firefox. So I can not put the appropriate folder name for the addon. Just placing the xpi files there, does nothing at all.
Also on the mozilla docs there is a way mentioned with -install-addon-globally which I tried with firefox executable and the addon file -- no success.
Any Ideas how to solve those issues?
Something that I just need to write in there and they run their installation stuff, what actually seems to be missing when just placing that file.
The first issue could be solved, if I just could run firefox once and close it, then the folder would be there and I can write into it but there is no command line option which terminates firefox after starting, so for Ansible I would need timeout to kill it if it does not return - (I think that's an ugly solution btw)
Any ideas or suggestions?
Thanks for any help!
You can create a firefox installer bundled with the extensions:
https://support.mozilla.org/en-US/kb/deploying-firefox-with-extensions

How to install xampp in mac

I am using MacBook Air. I installed the xampp but it's not working.
After some research, I found the URL http://localhost:8080/dashboard/ and I am getting the xampp. Now I am confused where should I get htdocs folder to add my code. Can anyone assist me?
Let's talk about in details
I downloaded the xampp from this link https://www.apachefriends.org/download.html
and I move it on the application. Now I am getting the xampp icon in application.
Then I open the xampp and I got a popup like and I click on start
I enable the 8080 port number.
Then I just I checked in the browser http://localhost:8080/dashboard/ and I found the xampp dashboard page.
Now I am not getting the htdocs folder. would you help me out in this?
I too have had lots of confusion setting up XAMPP on my Mac.
Things the docs said would work, just plain did not.
The short answer to your question: In MacOS X the htdocs dir of the virtual server is in:
/Users/<YOUR-USER-NAME>/.bitnami/stackman/machines/xampp/volumes/root/htdocs
More complete instructions for getting the server up:
Open up the XAMPP Application
Under General/Services start the XAMPP services
Under Network make sure to enable a port config (I chose localhost:8080->80)
In the Volumes "tab" click "Mount" beside /opt/lampp and then you can click "Explore" to open a finder window to the virtual server.
This will cause the virtual Network-Drive 192.168.xxx.yyy to show up in the Finder sidebar which has a single folder named lampp
Additionally a new external drive named lampp will also be available in Finder.
However you get to lampp, put your source-files in the htdocs folder.
Links that DID work for me on first launching:
http://localhost:8080/dashboard/
http://localhost:8080/phpmyadmin/
http://192.168.64.2/dashboard/
Links that did NOT work, in spite of docs claiming otherwise:
http://localhost/ or http://localhost/index.php
http://192.168.64.2/phpmyadmin/ <--Access Forbidden 403
A little late to the thread but I hit and solved this issue and I believe the OP had downloaded and installed the wrong version. At the time I am writing this, the link on the downloads page is for .dmg file is a VM file, or at least missing features of the full download. Instead of downloading that, go to the more downloads section
Once there, choose the version you need for your OS. This, and some mysql tweaks that are answered in multiple connected topics got me running.
Your XAMPP is working fine. You have to use Finder to go to htdocs.
Follow these steps -
Open the XAMPP application and hit "Start" button.
Make sure everything is proper by hitting "Go to Application".
Now you should see the dashboard on your browser, if not, restart the application and try again.
Go to Finder and on the sidebar you should see a volume labeled "192.168.64.2", go there and you will find a folder named "lamp".
See under the locations section
Inside lamp there will be htdocs, where you can place all the files you want the browser to access.Click on lamp

I couldn't change php.ini in Xampp

For some reason I should change some values in my php.ini but when I applied changes nothing happened.I Google that problem but I realized Apache need to restart but after restart my Apache nothing happened.
I really need to solve in this problem .I installed VMware before I installed xampp in my computer i tell that because i guess xampp and vmware are not working
well together.
have you opened the php.ini in and administration mode? Sometimes a simple notepad is not saving the file properly. Try installing Notepad++ and open the php.ini and while you're saving a prompt should pop-up asking for admin privilege and reopen the file.

Mac terminal Chrome Apps.localized

For some strange reason the Applications folder for a user login has changed itself.
It seems to have created an Alias for the real Applications folder and then stuck in Chrome Apps.locaslized in the original folder of applications.
This means I can no longer access my applications via the terminal. This is inconvient as I edit the Vhosts file of MAMP this way.
Can anyone shed some light as to how this might have happened and how I can revert it back so that Applications are put back into the applications folder as they should be
I have added an image so u can see what I mean
Type in:
cd /Applications
It will take you back to your list of all apps. I don't have an explanation but after playing around with the same issue I got back to my apps folder like that.
I'm having this same problem and this is the only other instance of it I found on google. Has anyone else encountered this or found a fix? After installing MAMP my Applications folder is now at /Applications instead of /Users/[username]/Applications
/Users/[username]/Applications now only contains Chrome Apps.localized

smb (windows share links) open protocol change

Is it possible to instruct my windows 8.1 machine to open links like these:
smb://c:\path to some folder\
in windows explorer?
Right now, Internet Explorer automatically comes up in response to a request to open smb:// link and says No apps are installed for this type of link (smb) - [Look for an app in the Store]
(The reason I have this problem is because I use mediawiki on my machine and have links to folders and files on some pages. I'd like to be able to click them from any computer on my network and be able to see the file/folder right away).
Many thanks.
Suppose you have a link like:
smb://a.b.com/public/
In windows you can open that in the file explorer this way:
\\a.b.com\public\

Resources