有没有办法使用DocumentRoot作为Apache的网站configuration文件的其他部分的variables? 如下所示: DocumentRoot /var/www/myNiceRoot <Directory $DocumentRoot/mySubDir> … </>
我的图像名称包含重音字母(é,à等)不能通过Apache访问(404错误)。 我认为这与Apache无关。 我检查了configuration文件: AddDefaultCharset UTF-8 当我通过Putty连接,并运行“ls -la”命令列出图像时,重音字母被replace为“?” 在控制台。 以下是可能有所帮助的相关信息: > echo $ LANG 是en_US.UTF-8 > cat / etc / environment 空的文件 > locale LANG =的en_US.UTF-8 LC_CTYPE = “的en_US.UTF-8” LC_NUMERIC = “的en_US.UTF-8” LC_TIME = “的en_US.UTF-8” LC_COLLATE = “的en_US.UTF-8” LC_MONETARY = “的en_US.UTF-8” LC_MESSAGES = “的en_US.UTF-8” LC_PAPER = “的en_US.UTF-8” LC_NAME = “的en_US.UTF-8” LC_ADDRESS = “的en_US.UTF-8” LC_TELEPHONE = “的en_US.UTF-8” […]
我想通过Apache / mod_wsgi部署一个Flask api。 api使用Gevent为recursion方法提供并发性。 但是,这是抛出以下错误 [Mon Feb 08 12:05:37 2016] [error] error: cannot switch to a different thread [Mon Feb 08 12:05:37 2016] [error] <callback at 0x1094ee350 args=()> failed with error 当使用Pycharm的内置web服务器运行时,整个api运行得很好,而当我不使用gevent来提供并发时,使用Apache / mod_wsgi很好地部署api。 我认为这应该可以在Apache中运行,但我到目前为止还没有find解决scheme。 我一直看到提及猴子修补,所以我把这一行添加到gevent被调用的模块 from gevent import monkey; monkey.patch_all() 但是,这似乎没有帮助。 我在Flask文档( http://flask.pocoo.org/docs/0.10/deploying/wsgi-standalone/ )上的独立WSGI容器中发现了这一点: Gevent is a coroutine-based Python networking library that uses […]
所以我一直在Apache日志中得到以下错误: sendmail: fatal: open /etc/postfix/main.cf: No such file or directory 我试图找出它在什么地方/什么时候被尝试,但我不知道在哪里的Apache日志我应该改变conf以获得这个显示更多的信息。 有任何想法吗? 我在我的apache2.conf(我认为会使其适当的格式): ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%{Referer}i -> %U" referer LogFormat […]
我正在使用nginx将HTTP请求代理到在Docker容器( cbeer / piwik )中的Apache 2.4(mod_php5)范围内运行的PHP应用程序。 +——————————+ | Docker Container | +——-+ | +——–+ +—–+ | | nginx |———–>|->| apache |———>| php | | +——-+ proxy_pass | +——–+ mod_php5 +—–+ | +——————————+ PHP应用程序是Piwik 2.16。 我使用nginx注入GeoIP HTTP标头: proxy_set_header GeoIP-Addr "$remote_addr"; proxy_set_header GeoIP-Country-Code "$geoip_country_code"; proxy_set_header GeoIP-Country-Name "$geoip_country_name"; proxy_set_header GeoIP-Continent-Code "$geoip_city_continent_code"; proxy_set_header GeoIP-Region-Name "$geoip_region_name"; proxy_set_header GeoIP-Region "$geoip_region"; proxy_set_header […]
我需要上传一个叫index.html的文件和我的index.php一起(请不要问为什么)有没有办法让所有的东西都保持原状,只有在用index.html页面请求的时候,才能提供index.html页面呢? (mysite.com/index.html) 我在apache服务器后面,如果需要,我可以修改.htaccess或虚拟主机。 谢谢
我正在使用Apache 2.4.18和OpenSSL 1.0.1e。 根据https://mozilla.github.io/server-side-tls/ssl-config-generator/ 进入拥塞的configuration,我收到了,但我不知道如何configuration它在Windows上,因为我不确定param SSLStaplingCache,它是一个目录? # OCSP Stapling, only in httpd 2.3.3 and later SSLUseStapling on SSLStaplingResponderTimeout 5 SSLStaplingReturnResponderErrors off SSLStaplingCache shmcb:/var/run/ocsp(128000) 谢谢
我只是把我们的网站移到DigitalOcean。 他们的DNS服务器closures了。 我查了一下,上次有一个涉及DNS服务器的问题花了28个小时修复。 这一刻我们有一个咨询服务。 咨询人员使用我们网站上的资源进行咨询。 我无法坚持28小时。 我要求DigitalOcean提供一个浮动IP地址。 我build立了一个额外的Apache虚拟服务器,将通过该端口监听81端口。 我们将失去SSLencryption,但他们将能够input一个IP地址来访问该网站。 这里是我启用的conf文件: Listen new.flo.ter.ip:81 <VirtualHost new.flo.ter.ip:81> ServerAdmin [email protected] ServerName www.mydomain.com ServerAlias mydomain.com DocumentRoot /path/to/public LogLevel warn ErrorLog /path/to/logs/prod_error.log CustomLog /path/to/logs/prod_access.log combined <Directory /path/to/public> # This relaxes Apache security settings. AllowOverride all # MultiViews must be turned off. Options -MultiViews </Directory> </VirtualHost> 'sudo ufw status verbose'产生: Status: active […]
我在启用扩展状态的Apache 2上启用了mod_status模块。 但是,当我不断检查服务器状态页面时,总访问以奇怪的方式增加(如每1秒100),虽然我没有任何stream量进入服务器,同时服务器状态不是在下面的请求列表中显示任何请求。 我如何logging任何http访问,并查看来自哪里的stream量以及哪些内容。
我在Apache 2.4.20和Ubuntu 16.04 LTS上使用PHP 7.0。 我已经按照这个指南有上传function,并想知道我可以做些什么来解决我收到以下错误: PHP致命错误:未捕获错误:类'Monolog \ Logger'找不到/var/www/vendor/dilab/resumable.php/src/Resumable.php:49 \ n堆栈跟踪:\ n#0 / var / www / upload .php(11):Dilab \ Resumable – > __ construct(Object(Dilab \ Network \ SimpleRequest),Object(Dilab \ Network \ SimpleResponse))\ n#1 {main} \ n抛出/ var / www / vendor / dilab第49行的/resumable.php/src/Resumable.php 有人可以帮我解决我的服务器上的这个错误? 编辑1 :composer php不下载任何名为“Monolog”或“Logger”的依赖项,那么为什么会发生? (请注意,这可能是一个composer php的问题,而不是一个PHP的问题毕竟…)