我安装了redmine几分钟(或几小时?)前,它在我的根域“mydomain.com”正常工作。 但是这不是我想要的。 我想要的是我的根域指向一些公共的东西,“redmine.mydomain.com”指向我的redmine-Project。 这是我的apache2.conf文件: LockFile ${APACHE_LOCK_DIR}/accept.lock PidFile ${APACHE_PID_FILE} Timeout 300 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 15 User ${APACHE_RUN_USER} Group ${APACHE_RUN_GROUP} Include mods-enabled/*.load Include mods-enabled/*.conf Include httpd.conf Include ports.conf Include conf.d/ Include sites-enabled/ ServerName *.mydomain.com <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/websvn/ ServerName svn.mydomain.com <Location /> Options FollowSymLinks AllowOverride None order allow,deny allow from all AuthType Basic […]
在阿帕奇,我想设置“基于IP的”托pipe2个网站,并启用他们的SSL。 但是,我不清楚如何configurationhttpd.conf文件。 问题: 1)我需要一个NameVirtualHost指令进行基于IP的设置? 在Apache的网站上,它说这是基于名称的需求,但没有提到基于IP。 2)如果需要NameVirtualHost,描述和数量必须与VirtualHost指令的数量相匹配吗? 例如,我可以说“NameVirtualHost *:80”和以后使用和? 或者,我需要“NameVirtualHost IP_ADDRESS_1:80”和“NameVirtualHost IP_ADDRESS_2:80” 3)如果ServerName是example1.com(没有“www”),它会有所作为? 4)在VirtualHost中,是否需要为ServerAlias设置一个值,比如IP本身? 我要分享的一件事情是,如果你有(可能包括)ssl.conf,你不应该添加“Listen 443”到你的httpd.conf,否则在重新加载时,apache会抛出一个“Address already in use:make_sock:无法绑定到地址[::]:443“错误。 #see above questions about below directive #NameVirtualHost *:80 #NameVirtualHost *:443 … <VirtualHost IP_ADDRESS_1:80> DocumentRoot /www/example1 ServerName www.example1.com </VirtualHost> <VirtualHost IP_ADDRESS_2:80> DocumentRoot /www/example2 ServerName www.example2.org </VirtualHost> <VirtualHost IP_ADDRESS_1:443> DocumentRoot /www/example1 ServerName www.example1.com SSLEngine on SSLProtocol all SSLCertificateFile /home/web/example1_certs/public.crt […]
我的工作中有一个Jira和一个Confluence系统。 两者都在同一台服务器上运行。 访问Jira和Confluence的实际URL是: http://foauslxapp05:8080/jira http;//foauslxapp05:8090/confluence 或者使用完整的主机名称: http://foauslxapp05.foservices.corp:8080/jira http://foauslxapp05.foservices.corp:8090/confluence 为了简化一切,我设置了一个代理规则来允许用户这样做: http://foauslxapp05/jira <– Accessing Jira http://foauslxapp06/wiki <– Accessing Confluence 我们的技术人员为foauslxapp05创build了一对服务器别名,以便: http://jira/jira <– Accessing Jira http://jira.foservices.corp/jira <– Accessing Jira http://wiki/wiki <– Accessing Confluence http://wiki.foservices.corp/wiki <– Accessing Confluence 我真正想要做的就是走下一步: http://jira <– Accessing Jira http://jira.foservices.corp <– Accessing Jira http://wiki <– Accessing Confluence http://wiki.foservices.copr <– Accessing Confluence 问题当然是,DNS名称jira和wiki只是foauslxapp05的 DNS别名。 我需要检测用户input的URL(即用户请求的主机),然后基于该URL,我需要将用户redirect到正确的应用程序。 我甚至不太确定我应该看什么:这个VirtualHost? […]
我正在尝试在我的Apache(2.2.3)networking服务器上安装eruby或erubis,所以我可以在.rhtml文件上运行内联ruby代码 – 我不太擅长命令行和shell脚本,我正在尝试和尝试学习新的东西,但是我不能为了我的生活得到任何正常工作。 我安装了Ruby(v 1.9.2p290),我知道它正常工作,因为我可以通过shell运行一些简单的rubyexpression式,例如: #ruby #puts "Hello World" ^D Hello, World! 我有Ruby Gem(v 1.8.23)的工作。 我也能够成功安装Rails(v 3.2.3)(通过gem),并按照guide.rubyonrails.org/getting_started.html中的指南获得了一个简单的rails应用程序 而且我并不是试图得到erubis(起初),现在eruby运行,所以我可以玩一些简单的内联ruby(ala PHP,我很熟悉) – 我安装了Erubis(通过gems)并运行v 2.7.0。 我查看了遍布erubis网站的更详细的说明,我觉得我已经做了一切必要的工作,但是它并没有parsingrubyexpression式。 我根据我在googlefind的几篇文章以及http://www.ruby-doc.org/docs/ProgrammingRuby/html/web.html (我觉得实际上不会为erubis做任何事情,但是我仍然尝试了…) 我张贴在SO(因为它总是帮助我相对较快,但我对这个问题没有任何反应),现在我试图安装eruby。 我下载并解压tar到我的cgi-bin并运行# ./configure.rb并得到了关于ftools的错误 – 我做了一些研究,发现ftools在Ruby 1.9中被弃用,并被fileutils取代。 我试图做一些replace,并提出更多的错误。 我在死路一条,我找不到很多关于这方面的信息,但我觉得我必须错过一些非常简单的事情。 有一个更简单的替代scheme来满足我的需求吗? 任何帮助或信息非常感谢!
服务器1(Proxy) – > Server2 / Server3(Apache) – > Server4(mySQL) 对于服务器1,我会设置HARproxy类似的东西? global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info maxconn 4096 #debug #quiet user haproxy group haproxy defaults log global mode http option httplog option dontlognull retries 3 redispatch maxconn 2000 contimeout 5000 clitimeout 50000 srvtimeout 50000 listen webfarm 192.168.0.99:80 mode http […]
我试图重写域名,然后redirect到一个新的页面。 因此,project1.com,www.project1.com,project2.co.nz和www.project2.co.nz结束所有redirect到新域名http://newsite.com罚款。 但是我需要project1.com/2012去http://newsite.com/blog/archive ? 我已经从域重写规则删除L ,以允许它评估最后的重写规则…但没有喜悦? <VirtualHost *:80> ServerName project1.com ServerAlias www.project1.com project2.co.nz www.project2.co.nz Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTP_HOST} !^newsite\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) http://newsite.com/$1 [R=301] # project1.com/2012 needs to go to -> http://newsite.com/blog/archive RewriteRule ^(2012)$ https://newsite.com/blog/archive [R=301] </VirtualHost> 如果任何人都可以帮助,将不胜感激。
我打算把我的网站(drupal 6.25)从apache切换到nginx。 我已经为nginx准备了一切,并在端口81上进行了testing。它工作正常。 现在我改变了听从81到80,并停止Apache,并启动Nginx。 网站开始给予 504网关超时 nginx的/ 0.8.54 并没有提供任何服务:(我的nginx服务器是 服务器{ 听80积分= 128; root / var / www / web1 / htdocs; index index.php index.html index.htm; server_name www.example.com; 位置 / { 如果(!-e $ request_filename){ 重写^ /(。*)$ /index.php?q=$1 last; } } access_log /var/log/nginx.web1.log; error_log /var/log/nginx.web1.error.log错误; 位置〜* ^。+ \。(jpg | jpeg | gif | css | png | […]
我试图configurationDebian 6.0.4与PHP5的大规模共享主机。 apache2-mpm-worker libapache2-mod-fcgid apache2-suexec软件包apache2-mpm-worker libapache2-mod-fcgid apache2-suexec 。 我成功地加载了mod_vhost_alias和suexec来pipe理我的域名,然后我把这个configuration放在/etc/apache2/sites-enabled/001-vhostalias : NameVirtualHost *:80 ServerName web-test.mynet.lan DocumentRoot /var/www/ SuexecUserGroup www-data www-data UseCanonicalName Off VirtualDocumentRoot /var/www/www.%2+/public_html/ VirtualScriptAlias /var/www.%2+/cgi-bin/ DirectoryIndex index.html index.htm index.shtml index.php ScriptAlias /__php5-cgi/ "/usr/local/lib/custom-cgi/php5-cgi/" Action php5-script /__php5-cgi/php5-cgi AddHandler php5-script .php 有了上面的这个,在线上,一个名为www.test-a.com的域名需要: adduser test-a.com (强制使用坏名字) mkdir -p /var/www/www.test-a.com/public_html并放置数据 文件chmod和chown , 一切工作正常 … 没有suEXEC我做了一些简单的PHPtesting,它工作正常uid / gid www-data 。 […]
我使用Apache的mod_proxy模块在我的EC2实例上configuration了一个HTTP代理服务器。 我现在希望代理只接受来自其他EC2实例的请求,我该如何实现? 这是我的代理configuration: ProxyRequests On <Proxy *> Order deny,allow Deny from all Allow from ??? </Proxy> 我知道一个解决scheme可能是必须代理监听另一个端口,并在AWS上configuration一个安全组,以便只有我的EC2实例可以访问该端口,这是要走的路吗? 谢谢。
我正在configurationApache使用客户端证书身份validation。 但是,当我浏览网站时,除非指定SSLCACertificateFile,否则它不要求我提供证书。 然后它会通过浏览器索取证书。 浏览器会popup一个框,要求我select一个证书(它只显示由SSLCACertificateFile指定的CA签名的证书)。 我正在使用自签名证书。 如果在SSLCACertificatePath中指定了“客户端”使用的证书,也没有关系。 任何有用的build议,为什么这样做? 除非指定SSLCACertificateFile,否则浏览器是否不要求证书正常? <VirtualHost _default_:443> DocumentRoot "C:/documents" ServerName server.ip:443 ServerAdmin [email protected] ErrorLog "C:/Apache2.2/logs/error.log" TransferLog "C:/Apache2.2/logs/access.log" SSLEngine on SSLCipherSuite HIGH:MEDIUM SSLCertificateFile C:/Apache2.2/certs/server.crt SSLCertificateKeyFile C:/Apache2.2/certs/server.key SSLCertificateChainFile C:/Apache2.2/certs/ca.crt SSLCACertificateFile C:/Apache2.2/certs/ca.crt SSLCACertificatePath C:/Apache2.2/allowed-crts SSLCARevocationPath C:/Apache2.2/revoked-certs SSLVerifyClient require SSLVerifyDepth 2 SSLOptions +ExportCertData +StdEnvVars <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory "C:/Apache2.2/cgi-bin"> SSLOptions +StdEnvVars </Directory> BrowserMatch ".*MSIE.*" […]