Posts Tagged apache
Accessing Your Local MAMP Dev Environment From VirtualBox
You already have a local development environment set up using MAMP (MAMP uses port 8888 so your localhost is accessed at http://localhost:8888 and custom sites, assuming you have set any up, are available at http://whatever:8888).
Naturally you need to test your sites in Internet *barf* Explorer so you have set up a virtual environment to do this. I am using Sun’s fantastic, open source application VirtualBox. The question is, how do you access your local sites from within VirtualBox? Launching IE and going to http://localhost:8888 does not work… hmmm.
Turns out, the address you need to point at is http://10.0.0.2:8888. That will get you to MAMP’s htdocs directory, i.e. your http://localhost:8888!
Now that is useful but it doesn’t get give you access to your custom sites. Here is how you access those!
- Open your Windows host file. It is found here:
C:\windows\system32\drivers\etc\hosts - Under the bit that says:
127.0.0.1 localhostadd the following (using whatever your actual project is called):10.0.2.2 whatever
That’s it! Now you can visit http://whatever:8888 using IE from within your virtual Windows environment.
Sample Configuration for mod_deflate
Posted by Stuart in Troubleshooting on April 30, 2009
These conf settings will avoid compressing images (generally a bad thing) but will compress various text, xml, css and javascript files. This is better than minifying javascript because minified js must be decompressed by the client js and this is not as efficient as doing it with Apache’s mod_deflate. This goes in httpd.conf.
#
# Deflate conf
#
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no=gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html





