虽然我理解这个概念,但我以前从未使用任何类型的源代码控制.我感到困惑(也许只是不知道)是我实现了什么好处和/或为什么我要配置Subversion和Apache?我是否需要使用Apache配置它才能通过网络从其他计算机访问我的存储库?请随意提供您认为相关的任何其他详细信息?
我现在的设置是笔记本电脑(Windows XP Pro)和虚拟机(Windows XP Pro).在我的虚拟机上,我有Apache 2.2,MySQL 5和PHP 5.虽然我很高兴听到偏离我的场景的示例/情况,但这个设置是我主要关注的问题.
我有一个正在运行的django/apache2 + memcached应用程序(ubuntu),并希望跟踪登录的在线用户.
追踪这个的最佳方法是什么?
每次登录用户加载页面时,我宁愿不写入数据库; 但还有其他选择吗?
我正在升级到Rails 3.2.6(ruby 1.9.3-p194)并在Debian上安装RVM并使用Apache2服务器(2.2.19).
我使用了这些非常好的说明:http://dalibornasevic.com/posts/21-rvm-and-passenger-setup-for-rails-2-and-rails-3-apps/
Apache服务器配置/etc/apache2/apache2.conf包括:
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p194@rails326/gems/passenger-3.0.13/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p194@rails326/gems/passenger-3.0.13
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p194@rails326/ruby
Run Code Online (Sandbox Code Playgroud)
当我设置好一切(并摆脱了大量的错误消息:)时,会出现以下来自乘客的错误消息:
$LOAD_PATH.unshift行,所有应该再次正常.通过$LOAD_PATH.unshift在MyApp/config/setup_load_paths.rb中注释,此错误消失,而我得到500错误,内部服务器错误.
/etc/log/apache2/error.log:
[ pid=5262 thr=3075372800 file=ext/apache2/Hooks.cpp:862 time=2012-07-10 12:33:41.475 ]: Unexpected error in mod_passenger: Cannot spawn application '/var/www/MyApp': The spawn server has exited unexpectedly.
Backtrace:
in 'virtual Passenger::SessionPtr Passenger::ApplicationPool::Client::get(const Passenger::PoolOptions&)' (Client.h:742)
in 'Passenger::SessionPtr Hooks::getSession(const Passenger::PoolOptions&)' (Hooks.cpp:294)
in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:563)
Run Code Online (Sandbox Code Playgroud)
如果有人能给我一个关于这个问题的线索,我会很高兴.
非常感谢你.
鸢尾花
我正在尝试清理我的apache vhosts,因为我已经有了一些'别名',并将它们全部放入mod_rewrite可能很烦人.然而,当我能到具体的网址(例如http://example.dev/robots.txt,http://example.dev/自身,虚拟主机不会回落到列出的网址(FallbackResource /index.php).
vhost是Zend Framework项目的容器,没有设置.htaccess文件.
访问日志显示.... "GET / HTTP/1.1" 302 0,但Google Chrome显示"未收到数据"和"错误324(net :: ERR_EMPTY_RESPONSE):服务器关闭连接而不发送任何数据."
注释掉这一FallbackResource行,然后重新启用<Location />基于-n的mod_rewrite就可以正常工作了.
编辑:我可以看到vhost中没有任何东西可以阻止它工作.几Alias行(FallbackResource应该使用)和一些FilesMatch停止访问具有特定扩展名的文件.日志中出现的唯一内容是404尝试转到URL而不是index.php(列出的资源).
<VirtualHost *:80>
ServerAdmin webmaster@site.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/website/current/html/
SetEnv APPLICATION_ENV productionbackend
# must be most specific first
Alias /i/static /var/website/static/i
# more /i/* Alias
Alias /i /var/website/current/resources/common-furniture/
# protecting files in the directory.
<FilesMatch ".*\.xml">
Order allow,deny
Deny from all
</FilesMatch>
<Directory "/var/website/current/html/">
Options …Run Code Online (Sandbox Code Playgroud) 所以我试图在apache2后面使用uwsgi,但我在CentOS 6机器上这样做.(我用于基于Debian/Ubuntu的系统上下文.)
我使用pip install uwsgi并遵循了使用Django应用程序启动uwsgi的指示(通过http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html).
我开始根据http://uwsgi-docs.readthedocs.org/en/latest/Apache.html配置apache2 ,但它没有说明从何处获取或如何构建mod_uwsgi或mod_proxy_uwsgi.mod_uwsgi.so肯定不在任何地方的系统上.有什么建议?
我想在ubuntu上的apache2上安装mod_wsgi.所以我安装了libapache2-mod-wsgi包,用a2enmod激活他.
我有一个网站(languageAnalyz),我试图用mod_wsgi.当我调用localhost/languageAnalyz时,我收到错误500.
在apache2日志中,我可以看到:
[Sun Aug 25 11:28:21 2013] [error] [client 127.0.0.1] mod_wsgi (pid=4993): Target WSGI script '/var/www/languageAnalyz/test-wsgi.py' cannot be loaded as Python module.
[Sun Aug 25 11:28:21 2013] [error] [client 127.0.0.1] mod_wsgi (pid=4993): SystemExit exception raised by WSGI script '/var/www/languageAnalyz/test-wsgi.py' ignored.
[Sun Aug 25 11:28:21 2013] [error] [client 127.0.0.1] Traceback (most recent call last):
[Sun Aug 25 11:28:21 2013] [error] [client 127.0.0.1] File "/var/www/languageAnalyz/test-wsgi.py", line 10, in <module>
[Sun Aug 25 11:28:21 2013] [error] [client 127.0.0.1] WSGIServer(app).run()
[Sun Aug 25 …Run Code Online (Sandbox Code Playgroud) 我正在尝试将Vaadin 7.1.5推送到Apache Tomcat 7.0.42 + Apache HTTP服务器(带有mod_proxy_wstunnel的2.2.14).
当我直接访问Tomcat时(即http://mydomain:8080/myapp),Vaadin应用程序和WebSocket推送工作正常.当我尝试使用Apache模块mod_proxy和mod_proxy_wstunnel访问它时出现问题.发生的情况是应用程序挂起,加载指示器变红,我在浏览器控制台的推送请求中收到此错误:
HTTP Status 501 - Websocket protocol not supported
type Status report
message Websocket protocol not supported
description The server does not support the functionality needed to fulfill this request.
Apache Tomcat/7.0.42
Run Code Online (Sandbox Code Playgroud)
需要推之前,我使用的mod_jk从请求转发http://mydomain/myapp到http://mydomain:8080/myapp.Apparenly mod_jk不支持WebSocket所以我选择使用ProxyPass指令.这是我的Apache配置:
ProxyPass /myapp/PUSH/ ws://localhost:8080/myapp/PUSH/
ProxyPassReverse /myapp/PUSH/ ws://localhost:8080/myapp/PUSH/
ProxyPass /myapp/VAADIN/ http://localhost:8080/myapp/VAADIN/
ProxyPassReverse /myapp/VAADIN/ http://localhost:8080/myapp/VAADIN/
ProxyPass /myapp http://localhost:8080/myapp
ProxyPassReverse /myapp http://localhost:8080/myapp
Run Code Online (Sandbox Code Playgroud)
我怀疑mod_proxy_wstunnel应该受到责备,但显然当我代理http://echo.websocket.org时,它工作正常.我发现Atmosphere抛出了501错误,但我不知道如何调试它.如果我删除了ws代理(因此push使用HTTP而不是WS),我会立即得到"Session expired"错误.
有谁知道如何正确地代理从Apache HTTP服务器到Apache Tomcat的推送请求?
我之前用过这个;
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "now plus 2 weeks"
// Lots omitted here
</IfModule>
Run Code Online (Sandbox Code Playgroud)
还有这个;
<IfModule mod_headers.c>
<filesMatch "\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|JPG)$">
Header set Cache-Control "max-age=1209600"
</filesMatch>
// Lots omitted here
</IfModule>
Run Code Online (Sandbox Code Playgroud)
我可以按内容类型设置过期,我可以通过文件扩展名设置任何标题.
但这些似乎都不允许你按内容类型设置任何你想要的标题.
我想根据响应的内容类型设置缓存控制头 - 请注意,这与文件扩展名不同.我有"友好的URL",所以没有文件扩展名被捕获,filesMatch因此没有文件扩展名,但内容类型是text/html.
如何为特定内容类型设置缓存控制标头?
我用Linux Mint 16,我进行了更新今天的版本Linux Mint 17,正确更新一切,但Xdebug的是没有被激活,所以我卸载并重新安装了它,我注意到,当我去安装Xdebug的,这表明此消息,警告您不能激活.
这是由于扩展的一些安全问题?如何启用xdebug现在这个新的更新安装?
default@Default-PC ~ $ sudo apt-get install php5-xdebug
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
php5-xdebug
0 upgraded, 1 newly installed, 0 to remove and 18 not upgraded.
Need to get 0 B/253 kB of archives.
After this operation, 982 kB of additional disk space will be used.
Selecting previously unselected package php5-xdebug.
(Reading database ... 272442 files and directories …Run Code Online (Sandbox Code Playgroud) 我已经尝试了所有类似问题的方法,但是没有运气。
我收到“您无权访问此服务器上的X”。应所有要求。
我在同一IP上有两个站点,apache配置文件是相同的,文件许可权是相同的,但是,一个可行而另一个不可行。
配置文件:
<VirtualHost x.x.xxx.xx:80>
ServerName site2.example.com
ServerAlias site2.example.com
Redirect / https://site2.example.com/
<IfModule mod_security2.c>
SecRuleEngine Off
</IfModule>
</VirtualHost>
<VirtualHost x.x.xxx.xx:443>
Protocols h2 http/1.1
ServerName site2.example.com
ServerAlias site2.example.com
ServerAdmin it@example.com
SetEnv ENVIRONMENT production
DocumentRoot /data/www/site2.example.com
<Directory /data/www/site2.example.com>
Options -Indexes +FollowSymLinks
AllowOverride All
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
Require all granted
</Directory>
<IfModule mod_security2.c>
SecRuleEngine Off
</IfModule>
ErrorLog /var/log/apache2/site2_error.log
LogLevel warn
KeepAlive On
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/site2.example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/site2.example.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
Header add Strict-Transport-Security "max-age=15768000"
# Add File …Run Code Online (Sandbox Code Playgroud)