linux下配置虚拟域名
linux下配置虚拟域名
1.hosts文件位置!
/etc/hosts
2.增加一行
127.0.0.1 xxxxx
3.修改apache中的vhosts
vi /etc/httpd/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin 192.168.1.66/admin
DocumentRoot "/usr/local/apache2/htdocs/tp5admin"
ServerName 192.168.1.66
</VirtualHost>
4.开启vhosts
Include conf/extra/httpd-vhosts.conf
5.重启apache
service httpd restart
解决The requested URL /login was not found on this server
<Directory />
AllowOverride All
Order allow,deny
Allow from all
</Directory>
DocumentRoot "/usr/local/apache2/htdocs"
<Directory "/usr/local/apache2/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
开启重写模块
LoadModule rewrite_module modules/mod_rewrite.so
linux下配置虚拟域名的更多相关文章
- Linux下Apache虚拟主机配置
Linux下Apache虚拟主机的三种配置.这样可以实现一台主机架构多个独立域名网站.其中基于域名的最为常见.性价比也最高.下面PHP程序员雷雪松详细的讲解下Linux下Apache虚拟主机配置的具体 ...
- Linux下配置多个tomcat多个域名
Linux下配置多个tomcat多个域名复制tomcat:mkdir /home/server/testcp -rf /home/server/shichuan/* /home/server/test ...
- Linux 下 FTP虚拟用户的使用配置
Linux下FTP虚拟用户的使用配置 Linux的FTP服务支持3种用户: 1.匿名帐户 2.本地帐户 3.虚拟用户 为什么要使用虚拟用户: 匿名帐户可以很好的保证FTP服务器的安全性,但是,对匿名用 ...
- 细说Linux下的虚拟主机那些事儿
细说Linux下的虚拟主机那些事儿 我们知道Linux操作系统是目前在服务器上应用广泛的操作系统.在Linux操作系统下的虚拟主机是不是就是我们常说的Linux虚拟主机呢?其实从专业方面说并不是,它是 ...
- Linux下配置PHP开发环境
转载于: http://www.uxtribe.com/php/405.html 该站下有系列PHP文章. 在Linux下搭建PHP环境比Windows下要复杂得多.除了安装Apache,PHP等软件 ...
- 一步一步教你如何在linux下配置apache+tomcat(转)
一步一步教你如何在linux下配置apache+tomcat 一.安装前准备. 1. 所有组件都安装到/usr/local/e789目录下 2. 解压缩命令:tar —vxzf 文件名(. ...
- Linux下配置Tomcat服务器
Linux下配置Tomcat服务器和Windows下其实差不多,可以去官网下载安装包释放或者在线下载,只是当时下载的windows.zip文件,现在下载.tar.gz格式的即可,下面使用命令行的方式安 ...
- Linux 下配置 SoftEther Client
我经常使用的代理有 SSH, GoAgent, FreeGate, VPN, HttpProxy 等等,不过 SoftEther 应该是我用过的最快.最稳定的 VPN 协议. Windows 下配置 ...
- The requested URL / was not found on this server——Apache配置虚拟域名后无法访问localhost
今天为了做项目,在Apache中配置了项目域名,成功访问.但是忽然发现要访问localhost突然出现The requested URL / was not found on this server. ...
随机推荐
- springboot整合ActiveMQ 2(主备模式,负载均衡)
基本使用,https://www.tapme.top/blog/detail/2018-09-05-10-38 主备模式,https://www.tapme.top/blog/detail/2018- ...
- The name ‘InitialzeComponent’ does not exist in the current context
在Visual Studio中创建Windows Store项目,在MainPage.xaml.cs中出现错误: The name 'InitialzeComponent' does not exis ...
- Sublime Text3 插件记录
插件官网 其他插件安装之前,先安装 Package Control: 快捷键Ctrl+`或View > Show Console打开控制台. 输入以下 Python 代码,回车. import ...
- RAP开发入门-主题更换
通过配置扩展点修改应用主题 ps:需要提前准备好主题(theme.css)文件 <!-- 注册主题扩展点 --> <extension point= ...
- Kinect安装与配置(openNI2)
原文链接:http://blog.csdn.net/chenxin_130/article/details/8580636 简介 最近OpenNI2的推出,小斤也要多给博客除除草了,并在闲暇之余做一些 ...
- bootstrap初用新得1
## 基本准备 1. 首先把相关软件窗口规划好,对于我的喜好,我喜欢把除了浏览器外的其他软件分为左右两个半屏.左边和右边很多软件之间是需要配合使用的: * 左边: scss文件,ps的guid ...
- RabbitMQ学习笔记(5)----RabbitMQ整合Spring
在Spring AMQP项目中Spring也提供了对RabbitMQ的支持,这里在之前学习SpringBoot的时候也整合过,但是今天这里使用的Spring的xml配置来整个rabbit. Sprin ...
- JS 20180416考试
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- Maven安装和eclipse里面的配置
一 . Maven简单介绍 Apache Maven是个项目管理和自动构建工具,基于项目对象模型(POM)的概念. 作用:完成项目的相关操作,如:编译,构建,单元测试,安装,网站生成和基于 ...
- codevs 2800 送外卖 floyd + Tsp
简单的状压动归 #include<cstdio> #include<algorithm> using namespace std; const int N=17; const ...