我试图让Apache虚拟主机与Amazon EC2实例一起工作。 我的httpd.conf如下所示 ServerName <elastic_ip>:80 Listen 80 NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /var/www/sites/site1 ServerName www.site1.com </VirtualHost> elastic_ip大致类似于Amazon-land中的静态IP。 我的问题是,该网站没有正确加载。 例如,当我在浏览器地址栏中键入以下内容: EC2-public-dns …. this works and loads the virtual host site www.EC2-public-dns …. this doesn't load and gives "The requested URL could not be retrieved", ie not any default page elastic-ip …. same as above www.elastic-ip …. […]
我有两台服务器:Ubuntu / Apache Web服务器和Windows 2008 IIS7服务器。 我有一个外部静态IP地址。 端口80上的所有Web请求都被转发到我的Ubuntu机器上。 我的大部分站点驻留在Ubuntu服务器上,但是,特定的站点需要托pipe在Windows 2008机器之外。 如何将我的Apache Web服务器上的特定虚拟主机的请求转发到IIS到我的networking上的另一台主机? 例如,我的Apache机器是192.168.100.110 ,所有对www.example.com的请求都需要透明地转发到192.168.100.101 。 所有的Web请求都将首先通过Apache机器。 我怎样才能做到这一点?
我只是build立了一个Ubuntu的Web服务器的微型实例亚马逊EC2。 Everthing运行良好,我设法configurationVirtualHost,但我很难设置子域。 以下是我所做的: $ mkdir /var/www/mydomain $ mkdir /var/www/mysubdomain $ chmod -R 774 /var/www/mydomain $ chmod -R 774 /var/www/mysubdomain $ vim /etc/apache2/sites-available/mydomian <VirtualHost *:80> ServerAdmin [email protected] ServerName mydomain.com ServerAlias www.mydomain.com DocumentRoot /var/www/mydomian </VirtualHost> $ vim /etc/apache2/site-available/mysubdomain <VirtualHost *:80> ServerName mysubdomain.localhost # also tried mysubdomain.mydomain.com DocumentRoot /var/www/mysubdomian <Directory /var/www/mysubdomain/ > Options Indexes FollowSymLinks MultiViews +Includes AllowOverride […]
当我浏览时,我有这个apaheconfiguration文件,我看到“It Works”,我期望看到一个文件列表,因为它有+ Indexes选项我做错了什么? <VirtualHost projects.com:80> ServerName projects.com ServerAdmin [email protected] DocumentRoot "/srv/www/" DirectoryIndex "index.html" "index.php" <Directory "/srv/www"> Options +MultiViews +FollowSymLinks +ExecCGI +Indexes -Includes AllowOverride All Order allow,deny Allow from all <IfModule mod_dav.c> DAV On </IfModule> </Directory> <IfModule mod_ssl.c> SSLEngine Off SSLCipherSuite "ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM" SSLProtocol -ALL +SSLv3 +TLSv1 SSLProxyProtocol -ALL +SSLv3 +TLSv1 </IfModule> <IfModule mod_dav.c> DAVLockDB "/var/run/davlocks/.davlock100" DAVMinTimeout […]
我有一个Apacheconfiguration三个虚拟主机条目。 每个条目绑定到不同的端口,以便我们可以根据端口提供不同的SSL证书。 我们的负载均衡器透明地将请求redirect到某些域名到networking服务器上的特定端口。 我的问题是,我有一个相当复杂的RewriteConds和RewriteRules的列表,这三个主机必须是相同的。 三个条目之间的唯一区别应该是ServerName , SSLCertificateFile和SSLCertificateKeyFile条目。 目前,我在每个VirtualHost条目中都复制了RewriteRules,但这使得难以更新规则并确保它们在各个条目中都是相同的。 所以我的问题是, 有没有一种方法可以将RewriteRules放在一个位置,但这会导致它们被应用到所有三个VirtualHost条目中? 作为一个方面说明,我也在一个单独的非SSLconfiguration文件中使用相同的规则。
请原谅这是一个初学者的问题,但我急需一些build议。 我想运行两个网站,说foo.org和bar.info ,在同一台服务器上。 两者都应该可以通过http和https访问。 我的目录/etc/apache2/sites-enabled包含文件foo和bar 。 这两个文件看起来像这样(省略一些日志logging): FOO <VirtualHost *:80> ServerAdmin [email protected] ServerName www.foo.org DocumentRoot /var/www/dir ServerAlias foo.org foo.de www.foo.de RewriteEngine On RewriteOptions inherit </VirtualHost> <VirtualHost *:443> ServerAdmin [email protected] ServerName www.foo.org DocumentRoot /var/www/dir ServerAlias www.foo.de RewriteEngine On RewriteOptions inherit # # SSL Specific options SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem […]
所以我需要设置一个具有一个域的VirtualHost ,根据IP地址将客户端路由到不同的应用程序。 例如,我想要一个访问example.com的美国用户来自/path/to/usa/application而来自不同国家的用户应该来自/new/international/application/path
我有一个networking服务器,我们正在给顾问FTP访问。 对于在该服务器上托pipe的一个域,他需要访问“开发”目录,而对于托pipe在该服务器上的不同域,他需要访问不同的目录。 我正在尝试使用VirtualHosts进行设置,但是我遇到了问题。 这里是我的proftpd.conf文件的VirtualHost位: <VirtualHost www.example2.com> ServerName "Example 2" DefaultRoot /var/www/example2/dev </VirtualHost> <VirtualHost www.example1.com> ServerName "Example 1" DefaultServer on DefaultRoot /var/www/example1 </VirtualHost> 当我FTP到任何一个域我总是得到第一个VirtualHost,即使我FTP到第二个域。
我在我的域的* .conf文件中有以下内容: server { listen 80; server_name domain.tld; access_log /var/log/nginx/domain.tld.accesslog; root /var/www/domain.tld; index index.htm index.html; } 我的问题是…如果我想让所有子域使用与domain.tld相同的文档根(和一般的相同设置)呢? 我试过这个: server { listen 80; server_name domain.tld; server_name *.domain.tld; access_log /var/log/nginx/domain.tld.accesslog; root /var/www/domain.tld; index index.htm index.html; } 但是,即使在重新加载后,这也行不通。 有任何想法吗?
我想有一个网页,我可以用所有的参数来定义我的病毒主机 Port Document Root Log 和所有其他参数,以便我可以有一个每个virual hosts Mysql Row ,Apache从那里获取所有的virual hosts 。 有没有办法做到这一点