Articles of 虚拟主机

虚拟主机显示“索引/”,而不是显示我的网站

所以我只是运行一个干净的安装山狮子OSX 10.8,并试图让一切恢复和运行。 我取消了http.conf中的php模块和vhosts,添加了brew,mcrypt,autoconf等。我使用VirtualHostX,并设置了我的域和本地path,但是当我把它拉起来时,它显示/我的应用程序的索引。 我有一个index.php在我的根,我的虚拟主机看起来像这样: NameVirtualHost *:80 <Directory "/Users/me/Sites/mysite.com/public/"> Allow From All AllowOverride All Options +Indexes </Directory> <VirtualHost *:80> ServerName "mysite.dev" DocumentRoot "/Users/me/Sites/mysite.com/public" </VirtualHost> 过去我花了好几个小时解决了这些问题……好起来了,但这是一个新问题,我似乎无法find问题所在。 我正在使用名为Laravel的php框架,并且doc根目录必须定向到公共目录。

如何configurationProFTPD为每个域提供不同的匿名FTP?

我正在尝试configurationProFTPD以匹配以下情况: 一个IP地址上有多个域。 每个域都应该有它自己的匿名FTP目录。 一切运行在Ubuntu 12.04LTS VPS服务器上。 例如,应该有一个ftp://example.com和ftp://otherdomain.com ,都有自己的目录,都只允许匿名下载。 我知道我需要创build一个IP别名(使用ifconfig eth0:0 192.168.1.100 (和192.168.1.101类似)),并在proftpd.conf或virtuals.conf中设置一个虚拟主机(同时尝试)。 这是我现在有 <VirtualHost example.com> ServerName "Example.com download" DefaultRoot /var/www/example.com/ftp MaxClients 10 <Anonymous /var/www/example.com/ftp> User ftp Group ftp UserAlias anonymous ftp RequireValidShell no DisplayLogin welcome.msg DisplayChdir .message <Limit LOGIN> AllowAll </Limit> </Anonymous> </VirtualHost> 每当我尝试使用此configuration访问服务器时,都会显示一个密码请求。 无论我尝试什么密码,我都无法进一步了解。 我看到消息来源声称,这是不可能与ProFTPD做,我已经看到了如何使它的工作(我一直无法运行)的指示来源。 许多networking主机在他们便宜的帐户上都有这种configuration,所以应该可能,尽pipe可能不适用于ProFTPd。 任何人都可以帮助configuration这种types的设置?

CentOS,虚拟接口ifdown删除物理接口上的IPv6地址

在CentOS 6.4中,在虚拟接口上使用“ifdown”时,物理接口上configuration的IPv6地址也会被删除。 我希望只有虚拟接口被改变。 如何防止虚拟接口上的“ifdown”影响物理接口上的IPv6地址? 我们使用一个物理网卡和多个虚拟接口运行CentOS 6.4服务器。 同样,我们有多个IPv6地址绑定到物理接口。 例如,/ etc / sysconfig / network-scripts / ifcfg-eth0是: DEVICE=eth0 IPV6_DEFAULTGW="AAAA:BBBB:CCCC:D::1" IPV6INIT="yes" USERCTL="no" DNS2="8.8.4.4" DNS1="8.8.8.8" IPADDR="xx.x.xxx.201" PRIMARY="yes" NETMASK="255.255.255.192" BOOTPROTO="static" IPV6ADDR_SECONDARIES="AAAA:BBBB:CCCC:D::202 AAAA:BBBB:CCCC:D::203" IPV6ADDR="AAAA:BBBB:CCCC:D::201" ONBOOT="yes" 并从ifconfig输出: # ifconfig eth0 eth0 Link encap:Ethernet HWaddr D4:AE:52:B4:AF:8C inet addr:xx.x.xxx.201 Bcast:xx.x.xxx.255 Mask:255.255.255.192 inet6 addr: AAAA:BBBB:CCCC:D::201/64 Scope:Global inet6 addr: AAAA:BBBB:CCCC:D::202/64 Scope:Global inet6 addr: AAAA:BBBB:CCCC:D::203/64 Scope:Global inet6 […]

与各种主机和HTTP / HTTPS的虚拟主机

我有我的vhosts.d目录下的文件,它被称为hosts.conf(从我收集的名称是不是一个问题)。 现在有各种主机,你可以看到,如果我使用http(端口80)没有任何问题,我可以从一个网站反弹到另一个,但如果我使用https(端口443)无论网站我在我的浏览器中键入我总是结束于首先与443端口列出的网站(在这种情况下为mobile-dev1。 * .it)。 显然我的真实文件没有*书面,但正确的网站名称。 <VirtualHost 10.65.200.7:80> DocumentRoot "/srv/www/htdocs/public" ServerName portal.***.it <Directory "/srv/www/htdocs/public"> allow from all </Directory> </VirtualHost> <VirtualHost 10.65.200.7:80> DocumentRoot /srv/mobile-dev1/public ServerName mobile-dev1.***.it <Directory /srv/mobile-dev1/public> allow from all Options +Indexes </Directory> </VirtualHost> <VirtualHost 10.65.200.7:443> DocumentRoot /srv/mobile-dev1/public ServerName mobile-dev1.***.it SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile /etc/ssl/certs/wildcard_***_it.pem SSLCertificateKeyFile /etc/ssl/private/wildcard_***_it.key SSLCertificateChainFile /etc/ssl/certs/RapidSSLCA.crt <Directory /srv/mobile-dev1/public> allow from all Options […]

使用https和虚拟主机为nginx设置自定义错误页面

我们有一个作为负载均衡器的nginx(OpenResty 1.4.2.7)实例。 它有两个服务器指令,一个服务于一个特定的站点(让我们称之为www.our-special-host.com)和一个通配符。 我们正在尝试对其进行configuration,以便显示不同的502错误页面,具体取决于两个服务器伪指令的后端是closures的。 我们的configuration适用于HTTP,但不适用于HTTPS。 如果我们closures后端并打到www.our-special-host.com,我们会得到适当的HTTP和HTTPS错误。 但是,如果我们点击了其他托pipe站点,则会得到HTTP的正确错误页面,但对于HTTPS,我们会获得www.our-special-host.com的错误页面。 这里是我们的configuration(轻度编辑): server { server_name www.our-special-host.com listen 80; listen 443 ssl; error_page 502 /nginx_errors/loadbalancer_502_on_special_host.html; location /nginx_errors/ { alias /path/to/nginx_errors/; } location / { proxy_pass xxxx; … } ssl_certificate certificate.crt; ssl_certificate_key pk.key; } server { listen 80; listen 443 ssl; error_page 502 /nginx_errors/loadbalancer_502_on_other_hosts.html; location /nginx_errors/ { alias /path/to/nginx_errors/; } location […]

“伪装”邮件发件人在多域共享主机上

我有一台CentOS 6.3的主机。 我通过SSHpipe理该主机。 服务器本身是uname -n : servername.foo.com 。 在这个主机上我有多个不相关的 httpd虚拟主机。 问题是:当一个虚拟主机用PHP邮件()发送邮件时,发送的邮件头包含多个servername.foo.com跟踪(消息ID是[email protected],由servername.foo.com收到,上)。 邮件是由postfix发送的。 此服务器上不使用其他邮件服务。 现在的问题是: 我怎么能从每个虚拟主机发送电子邮件假装是那个Vhost.com,而不是在邮件头中留下servername.foo.com的痕迹?

vServer Debian Linux虚拟主机问题

我有几天的虚拟主机设置有问题。 我的服务器是debain linux的虚拟服务器,我试图添加两个新的域,将被redirect到他们自己的子文件夹。 Domain1.com – > / var / www / domain1 Domain2.com – > / var / www / domain2 设置工作正常,但域不redirect到子文件夹,但服务器根目录。 所以,如果我打开“domain1.com”,我将被redirect到“domain1.com/mail”,这是一个roundcube安装。 以下是我如何做的设置: 在/ etc / apache2的/网站可用/ DOMAIN1 <VirtualHost domain1.com> ServerAdmin webmaster@localhost ServerAlias domain1.com *.domain1.com DocumentRoot /var/www/domain1 </VirtualHost> / etc / hosts文件 127.0.0.1 localhost.localdomain localhost domain1.com www.domain1.com 我只是不明白为什么它不被redirect到子文件夹…有人可以告诉我我做错了什么?

Apache 2.4 – 403 HTTP状态码

在Debiantesting中,我得到了一个403错误信息。 Apache版本: # aptitude show apache2 | grep -i version Version: 2.4.9-1 # ls -la /home/ total 28 drwxr-xr-x 4 root root 4096 Apr 3 13:19 . drwxr-xr-x 23 root root 4096 Apr 4 07:28 .. drwx—— 2 root root 16384 Apr 3 13:13 lost+found drwx–x–x 36 username username 4096 Apr 7 13:30 username # […]

子域redirect到HTTPS,尽pipe缺less重写规则

我在staging.example.com上有一个域,我想在没有HTTPS的情况下运行它来进行testing。 主域(example.com)确实使用SSL。 我试图find一个重写规则,将转发到主域的HTTPS,但不是子域名(除www。)。 目前,我已经通过删除所有可以从我的虚拟主机文件find的重写规则进行了testing,并访问了域和子域。 尽pipe为两个虚拟主机文件再次运行a2ensite并运行sudo服务apache2重新加载和sudo服务apache2重新启动,浏览器仍然被redirect到子域和主域上的HTTPS。 这个redirect可能发生在其他地方吗? 这是我的虚拟主机: <VirtualHost *:80> ServerAdmin [email protected] ServerName example.com ServerAlias www.example.com DocumentRoot /srv/www/example.com/public_html/example/example-production/current/public Options Indexes FollowSymLinks Includes ExecCGI <Directory /srv/www/example.com/public_html/example/example-production/current/public> Allow from all Options -MultiViews -Indexes </Directory> ErrorLog /srv/www/example.com/public_html/example/example-production/current/log/error.log CustomLog /srv/www/example.com/public_html/example/example-production/current/log/access.log combined <Location /> </Location> </VirtualHost> <VirtualHost *:443> ServerName example.com ServerAlias www.example.com DocumentRoot /srv/www/example.com/public_html/example/example-production/current/public ErrorLog /srv/www/example.com/public_html/example/example-production/current/log/error.log SSLEngine On SSLCertificateFile /etc/apache2/ssl/certs/example.com.crt SSLCertificateKeyFile […]

.htaccess被应用到错误的域

我已经configuration我的Apache这样的: <VirtualHost *:80> ServerName www.th3falc0n.de ServerAlias th3falc0n.de *.th3falc0n.de DocumentRoot /var/www/html/th3falc0n <Directory /var/www/html/th3falc0n> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName www.lolhens.org ServerAlias lolhens.org *.lolhens.org DocumentRoot /var/www/html/lolhens <Directory /var/www/html/lolhens> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> 我在/ var / www / html […]