我有两个叫做finance和fleet Zend框架应用程序。 它们都具有相同的.htaccess文件,如下所示 RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ – [NC,L] RewriteRule ^.*$ index.php [NC,L] 我创build了两个名为fleet.local和finance.local虚拟主机。 这是我的fleet.local文件: # APACHE CONFIGURATION FOR THE fleet.local APPLICATION <VirtualHost *:80> ServerName fleet.local DocumentRoot /home/user/fleet/public SetEnv APPLICATION_ENV dev <Directory /home/user/fleet/public> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all […]
我正在尝试使用沙箱方法设置一个django开发服务器。 具体的技术是apache2,mod_wsgi和django。 我想使用格式为:{project} – {user} .domain.com的子域名。 我想这个子域指向这里:/首页/ {用户} / {项目} /应用程序/ django.wsgi。 是否可以通过虚拟主机设置自动工作,如果是这样,这样的虚拟主机文件将是什么样子?
我已经从我的debian挤压盒上的icinga自己的回购安装了icinga,但现在我不知道如何改变当前的configuration: # apache configuration for icinga ScriptAlias /cgi-bin/icinga /usr/lib/cgi-bin/icinga ScriptAlias /icinga/cgi-bin /usr/lib/cgi-bin/icinga # Where the stylesheets (config files) reside Alias /icinga/stylesheets /etc/icinga/stylesheets # Where the HTML pages live Alias /icinga /usr/share/icinga/htdocs <DirectoryMatch (/usr/share/icinga/htdocs|/usr/lib/cgi- bin/icinga|/etc/icinga/stylesheets)> Options FollowSymLinks DirectoryIndex index.html AllowOverride AuthConfig #Order Deny, Allow Deny from all #Allow From 10.42.0.0/24 AuthName "Icinga Access" AuthType Basic AuthUserFile […]
所以我有这个网站被Apache 2作为一个虚拟主机。它有一个公吨的替代域名,都应该解决这个问题。 到目前为止,我已经通过在vhostconfiguration文件的ServerAlias列表中添加额外的域来处理这样的事情。 但是,随着别名域名数量的增长,这个名单变得非常漫长和笨拙。 它还需要分别添加裸露的域名和“www”版本,(因为我必须记住添加两者)为我留下空间是一个白痴,忘记添加一个或另一个。 还没有发生,但是当这个清单足够长的时候,这样的遗漏就不会像他们那样只有几个域名跳出来,所以我担心这一点在某一天是不可避免的。 似乎应该有办法将vhostconfiguration文件中的别名列表踢到其他可以更容易pipe理的地方。 即使是一个文本文件,每个别名在自己的行上都是一个改进,因为至less可以更直观地浏览列表,而不是使用逗号分隔的长整行。 而且似乎应该有一种方法来为vhost自动处理“www”子域,而不是需要为每个域手动添加“www”别名。 但是我一直在寻找这样的东西,还没有find任何明显的解决scheme。 这可能只是我没有在正确的地方看,但以防万一 – 有一个更优雅的方式来处理虚拟主机的ServerAliases? 如果是这样,那是什么?
我有一个虚拟主机lessapache2服务器。 其中两个虚拟主机使用modJK来处理由Glassfish生成的页面。 我有全局configurationmodJK和JkMount指令只用于VirtualHost部分。 一般来说,这个configuration是有效的,但是有时(经常),当我尝试访问这些Glassfish页面时,得到了503错误。 我不知道如何find一个原因(也许一些命中?),但我改变了日志级别modJkdebugging。 我看到这样的条目: jk_map_to_storage::mod_jk.c (3773): missing uri map for domainWithoutJkMount:/viewtopic.php 这是一个由PHP处理的请求条目,并且该域的虚拟主机没有JkMount 。 所以据我所知, modJK的文档不应该从这个VH发送任何东西到modJk。 为什么我可以在日志文件中看到这些条目?
我试图在我干净的安装Ubuntu 14.04上使用“Php反向shell”作为学校用途。 我正常地configuration了我的Apache / PHP / MySQL。 我需要得到php函数“pcntl_fork()”的工作。 为了得到它的工作,我需要使用PHP-CGI,但是在6个小时的尝试之后我无法工作。 这是我遵循的最后一个教程: http : //www.binarytides.com/setup-apache-php-cgi-ubuntu/ 我有一些麻烦,现在我试图解决它们。 这是我的.conf文件现在的样子: <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port t$ # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what […]
我的设置如下:我有一个运行不同虚拟主机的Apache2networking服务器,一个虚拟主机用于生产网站,另一个虚拟主机用于登台/预览系统。 这两个虚拟主机有不同的DocumentRoot和不同的(Perl)CGI文件夹。 每个虚拟主机使用的模块应该在不同的目录中,所以我做了以下几点: <VirtualHost…> ServerName production SetEnv PERL5LIB /home/production/modules </VirtualHost> <VirtualHost…> ServerName staging SetEnv PERL5LIB /home/staging/modules </VirtualHost> 不过,我只注意到,在我的Perl CGI脚本中,两条path都被填充到我的@INC中,所以我不能将生产模块与生产模块分开,例如SetEnv指令不仅限于单个虚拟主机,而且似乎全球工作。 我该如何解决这个问题? 谢谢! 乔纳斯
我有一个域名:www.example.com,我需要通过https和http访问这个域名。 我有一个保护www.example.com和example.com的证书(GeoTrust)。 我也需要保护app.example.com。 app.example.com是唯一需要通过https才能访问的东西,但它不需要适当的证书:自签名就足够了。 我尝试了许多不同的configuration(即使对主域和子域使用相同的证书),但没有任何工作! 下面的configuration是我尝试的后者,但结果是,如果我连接到app.example.com,它会告诉我连接不可信,然后一旦被接受,它会将我redirect到www.example.com! 任何帮助? 谢谢。 <VirtualHost *:80> DocumentRoot "/var/websiteexample/public/www" ServerName www.example.com ServerAlias example.com <Directory "/var/websiteexample/public/www"> allow from all Options +Indexes </Directory> </VirtualHost> <VirtualHost *:443> DocumentRoot "/var/websiteexample/public/www" ServerName www.example.com ServerAlias example.com SSLEngine on SSLCertificateFile /root/www.example.com.crt SSLCertificateKeyFile /root/www.example.com.key <Directory "/var/websiteexample/public/www"> allow from all Options +Indexes </Directory> </VirtualHost> <VirtualHost *:443> DocumentRoot "/path/to/another/app" ServerName app.example.com SSLEngine […]
当我尝试在我的机器上访问我的网站时,我收到Firefox中标题中提到的错误。 这是我得到的错误: An error occurred during a connection to www.st.um. SSL peer was unable to negotiate an acceptable set of security parameters. (Error code: ssl_error_handshake_failure_alert) 这是我的虚拟主机configuration: <VirtualHost *:443> ServerAdmin [email protected] ServerName www.st.um DocumentRoot /var/www/web <Directory /var/www/web> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> SSLEngine on SSLCertificateFile /usr/lib/ssl/demoCA/servercert.pem SSLCertificateKeyFile /usr/lib/ssl/demoCA/serverkey.pem SSLCACertificateFile […]
我在Linux Mint 13 Maya上用php5运行apache2。 我已经定义了一个虚拟主机和这两个条目: ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined 这会在var/log/apache2产生错误和访问日志。 我想让我的PHP错误进入PHP错误日志。 在我的/etc/php5/apache2/php.ini我已经设置: display_errors = On log_errors = On error_log = /var/log/php-errors.log log_errors_max_len = 0 error_reporting = E_ALL | E_STRICT 生成了日志文件/var/log/php-errors.log ,但是它所logging的是两个警告,一些模块已经加载。 我试图在虚拟主机defintion中注释掉日志指令,但是这并没有改变,所有的错误仍然logging在Apache日志中。 我在这里错过了什么?