linux下apache 配置虚拟主机
来源:互联网 发布:域名不让转出怎么办 编辑:程序博客网 时间:2024/04/28 07:49
Virtual host¶
You now need to create an Apache virtual host for the application and edit yourhosts file so thathttp://zf2-tutorial.localhost will serveindex.php from thezf2-tutorial/public directory.
Setting up the virtual host is usually done within httpd.conf orextra/httpd-vhosts.conf. If you are usinghttpd-vhosts.conf, ensurethat this file is included by your mainhttpd.conf file. Some Linux distributions(ex: Ubuntu) package Apache so that configuration files are stored in/etc/apache2and create one file per virtual host inside folder/etc/apache2/sites-enabled. Inthis case, you would place the virtual host block below into the file/etc/apache2/sites-enabled/zf2-tutorial.
Ensure that NameVirtualHost is defined and set to “*:80” or similar, and thendefine a virtual host along these lines:
<VirtualHost *:80> ServerName zf2-tutorial.localhost DocumentRoot /path/to/zf2-tutorial/public SetEnv APPLICATION_ENV "development" <Directory /path/to/zf2-tutorial/public> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory></VirtualHost>
Make sure that you update your /etc/hosts orc:\windows\system32\drivers\etc\hosts file so thatzf2-tutorial.localhostis mapped to127.0.0.1. The website can then be accessed usinghttp://zf2-tutorial.localhost.
127.0.0.1 zf2-tutorial.localhost localhost
- linux 下apache 配置虚拟主机
- linux下apache虚拟主机配置
- linux下apache 配置虚拟主机
- Linux下Apache虚拟主机配置
- Linux下Apache虚拟主机配置
- Linux apache下虚拟主机配置
- Linux下Apache配置虚拟主机
- linux下apache的虚拟主机配置
- linux下apache多虚拟主机配置
- linux下apache https 虚拟主机配置
- linux apache下虚拟主机配置方法
- Linux 下Apache虚拟主机的配置
- Apache下配置虚拟主机
- apache下虚拟主机的配置
- 在apache下配置虚拟主机
- apache下配置虚拟主机服务
- windows下配置apache虚拟主机
- Apache下配置虚拟主机总结
- 成果展示
- Scramble String
- CWnd与HWND的区别与转换
- Android生成签名文件并用其对apk文件进行签名(Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]错误完美解决)
- 非常感人的分手对白:伤感日志
- linux下apache 配置虚拟主机
- 队列的学习
- fflush(stdout)作用
- 英语汉语对比学习:名词(二)
- uva_10405Longest Common Subsequence
- 【工具】XP超级终端的设置与使用
- View Output 报表结果文件存放目录
- Linux设备驱动学习资源
- TSPITR