how-to setup apache on mac
2013-04-26 09:25
447 查看
在10.8以后, 需要
1. nano /etc/apache2/users/pengcheng.conf
在其中加入, 其中pengcheng/Sites这个文件夹如果不存在, 可以自行建立.
<Directory "/Users/pengcheng/Sites/">
Options Indexes Multiviews
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>
2.
sudo apachectl start
3. 这时如果apache运行正常, 应该可以访问 http://127.0.0.1/, 返回it works.
4. 想要暴露的东西放在/Users/pengcheng/Sites下, 比如/Users/pengcheng/Sites/folder1/text1.txt
那么可以访问http://127.0.0.1/~pengcheng/folder1/text1.txt
1. nano /etc/apache2/users/pengcheng.conf
在其中加入, 其中pengcheng/Sites这个文件夹如果不存在, 可以自行建立.
<Directory "/Users/pengcheng/Sites/">
Options Indexes Multiviews
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>
2.
sudo apachectl start
3. 这时如果apache运行正常, 应该可以访问 http://127.0.0.1/, 返回it works.
4. 想要暴露的东西放在/Users/pengcheng/Sites下, 比如/Users/pengcheng/Sites/folder1/text1.txt
那么可以访问http://127.0.0.1/~pengcheng/folder1/text1.txt
相关文章推荐
- How to setup Apache+FastCGI+Rails on windows
- How to setup Apache+FastCGI+Rails on windows
- How to Install Apache Tomcat 8 (on Windows, Mac OS X, Ubuntu) and Get Started with Java Servlet Prog
- How To Setup Apache Hadoop On CentOS
- How to setup multiple sites hosted on your Mac with OSX 10.8 + (MAMP Part 5)
- How To Setup a Rails 4 App With Apache and Passenger on CentOS 6
- How to setup Tensorflow inception-v3 model on Windows
- how to hide dock of running app on mac
- How to Install Linux, Apache, MySQL, PHP (LAMP) stack on CentOS 6 【Reliable】
- How to Install Subversion on Mac OS X
- How to install and configure Apache, PHP, MySql and phpMyadmin on ubuntu
- How to set JAVA_HOME on mac
- How to install/setup latest version of PHP 5.5 on Ubuntu 12.04 LTS (Precise Pangolin)
- How to Setup Replicated LevelDB Persistence in Apache ActiveMQ 5.9--转载
- How to test Apache CloudStack 4.2 on your local machine
- How To Install MongoDB On Mac OS X
- How to configure JMX on Apache Tomcat
- How to Setup Active DataGuard on Exadata (Doc ID 1580796.1)
- How to install and setup Tor on Kali Linux 2.0(如何在Kali Linux 2.0 下安装 Tor)
- How to install Apache Server on Windows