有没有一个服务,可以确定一个网站的托pipe(大概是由IP)?
我有以下的conf文件: 文件1: NameVirtualHost 123.45.67.890:80 <VirtualHost 123.45.67.890:80> ServerName example.com RedirectPermanent / https://example.com/ # RewriteEngine On # RewriteCond %{SERVER_PORT} !^443$ # RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R] # SSLRequireSSL # Redirect permanent /secure https://example.com/ # Redirect / https://example.com/ </VirtualHost> 正如您从注释行中看到的,我尝试了几种方法。 文件2: NameVirtualHost 123.45.67.890:443 <VirtualHost 123.45.67.890:443> DocumentRoot "/opt/www/example-docroot" ServerName example.com DirectoryIndex index.html SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile /etc/httpd/conf.d/ssl/example.com/csr.example.2011.pem.blade SSLCertificateKeyFile /etc/httpd/conf.d/ssl/example.com/nokey.example.2011.pem […]
这里是我的/etc/httpd/conf.d/test.conf NameVirtualHost *:80 <VirtualHost *:80> ServerName test.dev ServerAlias test.dev.*.xip.io DocumentRoot /var/www/html/user/test/web ErrorLog "/var/www/html/user/test/app/logs/httpd_error.log" CustomLog "/var/www/html/user/test/app/logs/httpd_access.log" combined <Directory "/var/www/html/user/test/web"> # AllowOverride All # Deprecated # Order Allow,Deny # Deprecated # Options All # Allow from all # Deprecated # Require all granted # << New way of doing it Options +FollowSymlinks +Indexes AllowOverride all </Directory> </VirtualHost> […]
我刚刚安装了Apache 2.2,并试图在相同的服务器configuration上托pipe两个域。 我首先创build了一个虚拟主机( a.com ),并debugging了我的configuration以使其正常工作。 当我尝试添加虚拟主机b.com并尝试访问它时,我所得到的只是a.com的正确页面。 两个虚拟主机都指向相同的静态IP地址。 服务器在VPS上运行CentOS。 /usr/local/apache2/conf/httpd.conf具有基本的configuration,并且部分包含在下面,但是我有httpd.conf Include第二个文件, clients.conf又Includes每个站点的configuration,这是在不同网站的主目录。 (每个网站都有自己的帐户,目录web , scripts , data和config 。) httpd.conf中: Listen 80 NameVirtualHost [ip] # […] Include /usr/local/apache2/conf/clients.conf clients.conf: Include /home/[a]/conf/apache/vhost.conf Include /home/[b]/conf/apache/vhost.conf /home/[a]/conf/apache/vhost.conf <VirtualHost [ip]> ServerName www.[a].com ServerAlias [a].com ServerAdmin [me]@[a].com DocumentRoot /home/[a]/web/home ErrorDocument 404 "http://www.[a].com/error/?404" <Directory /home/[a]/web/home> Options -Indexes FollowSymLinks # Don't allow any .htaccess […]
我有一个Apache服务器中的两个虚拟主机,我想做的事情,但我不知道是否有可能。 事情是我有主要的应用程序开发和ruby和博客是在wordpress。 所以现在我有这样的东西: example.com和blog.example.com 我想要做的是,对www.example.com/blog的所有请求都由blog.example.com提供,但是不会执行redirect(即,我不希望用户看到URL中的更改) 我到目前为止所尝试的是在VirtualHost中做一个代理: <Location /blog> ProxyPassReverse http://blog.example.com ProxyPassReverse http://blog.example.com:80 RewriteEngine On RewriteRule blog/(.*)$ http://blog.example.com/$1 [QSA,P,L] </Location> 它可以工作,但是一旦我在另一个应用程序中,所有链接都在blog.example.com中,而不是在example.com/blog中。 你知道这个解决方法吗? 感谢您的帮助。
我是我公司的高级开发人员和系统pipe理员,所以我正在努力处理这两个活动的需求。 我已经build立了我们的apache框,它处理30-50个域atm(并希望会变大),并承载生产和开发的网站,这个目录结构: domains/ domains/domain.ext/ #FTPS chroot for user domain.ext domains/domain.ext/public #the DocumentRoot of http://domain.ext domains/domain.ext/logs domains/domain.ext/subdomains/sub.domain.ext domains/domain.ext/subdomains/sub.domain.ext/public #DocumentRoot of http://sub.domain.ext 每个domain.ext Vhost通过mpm-itk运行,他的专用用户和组,umask是027,日志通过pipe道sudo命令存储,如下所示: ErrorLog "| /usr/bin/sudo -u nobody -g domain.ext tee -a domains/domain.ext/logs/sub.domain.ext_error.log" CustomLog "| /usr/bin/sudo -u nobody -g domain.ext tee -a domains/domain.ext/logs/sub.domain.ext_access.log" combined 现在,我已经读了很多关于不让日志从一个非常有限的目录中出来,但是开发人员经常需要快速查看一个特定的子域错误日志,而且我不想让他们具有pipe理员权限看看/ var / logs。 把它们提供到ftp帐户在开发阶段是非常方便的。 你认为这个设置是否可行和安全? 对我来说显然看起来不错,但我关心的3个安全问题: – sudopipe道是否足以处理符号链接漏洞? 我失踪的任何捕获? -log dos:logs位于所有域的同一个分区中。 […]
我正在运行Linux的薄荷,我试图用apachebuild立一个虚拟主机。 我在/ etc / apache2 / sites-available /中添加了以下文件(它从该目录中的“默认”文件中复制) <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName testsite.dev DocumentRoot /home/chris/Projects/web/testsite <Directory /home/chris/Projects/web/testsite> Allow from all AllowOverride All Order allow,deny </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, […]
我想添加第二个虚拟主机到我的apacheconfiguration,但似乎无法得到新的虚拟主机使用。 我的httpd.conf只包含以下行: ServerName radiofreebrighton.org.uk 我也有一个ports.conf文件,其中包含以下内容: NameVirtualHost *:80 Listen 80 <IfModule mod_ssl.c> Listen 443 </IfModule> 我在sites-available有两个文件,它们是通过a2ensite sites-enabled的a2ensite链接的sites-enabled : radiofreebrighton.org.uk trafalgararches.co.uk 第一个内容是: <VirtualHost _default_:80> DocumentRoot /home/tom/www ServerAdmin [email protected] ServerName radiofreebrighton.org.uk ServerAlias www.radiofreebrighton.org.uk <Directory /home/tom/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/error.log LogLevel error CustomLog /var/log/apache2/access.log combined Alias /wiki /home/tom/www/mediawiki/index.php </VirtualHost> […]
我是Apache服务器的新手(2.0,我知道它有点太旧,但是我的工作场所要求我学习它,因为它是我们正在使用的版本),现在试图使Apache与Jboss(Jboss应用程序服务器,Apache面向JBoss并提供所有静态内容)。 我已经通过mod_jk与Apache的Jboss合作; 然而,当我试图添加虚拟主机configuration来让Apache从特定文件夹提供图像而不是推动JBoss提供静态内容时,我得到了403 Forbidden错误。 我经历了几个论坛和其他网站挖掘出一个答案或解决这个问题,可悲的是没有什么似乎为我工作! 🙁 请任何人都可以帮助我呢? 一点点的解释将是一个欢迎添加。 以下是我在httpd.conf文件中的虚拟主机定义。 <VirtualHost *:80> ServerAdmin admin@localhost ServerName localhost DocumentRoot "D:/Dev-Ops/apache/Apache2/htdocs/jboss/" <Directory "D:/Dev-Ops/apache/Apache2/htdocs/jboss/"> AllowOverride All Order Allow,Deny Allow from all Require all granted </Directory> #rewrite incoming requests RewriteEngine On RewriteCond /SchoolApp%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ http://localhost:8080/SchoolApp/$1 [proxy,last] </VirtualHost> 您的帮助将不胜感激。 PS:我在尝试其他几个这样的指示后,正在关注这个链接 。
我有一个虚拟主机,我正在尝试使用LDAP身份validation。 我的configuration如下所示: <VirtualHost 0.0.0.0:80> DocumentRoot "/var/www/root/" ServerName myServerName ServerAlias http://myServerName.com/ LogLevel debug ErrorLog "/var/log/apache2/svn_error_log" CustomLog "/var/log/apache2/svn_access_log" common <Directory "/var/www/root/"> Allow from all DirectoryIndex index.php </Directory> <Location "/"> AuthType Basic AuthBasicProvider ldap AuthzLDAPAuthoritative off AuthName "Auth" AuthLDAPURL "myLDAPURL" AuthLDAPBindDN "myLDAPBindDN" AuthLDAPBindPassword my-safe-password Require ldap-group OU=Users,OU=A,DC=B,DC=C,DC=D </Location> </VirtualHost> 当我尝试login时,它会拒绝我的身份validation并在日志中声明: auth_ldap authenticate: using URL myLDAPURL auth_ldap authenticate: accepting […]