虽然我理解这个概念,但我以前从未使用任何类型的源代码控制.我感到困惑(也许只是不知道)是我实现了什么好处和/或为什么我要配置Subversion和Apache?我是否需要使用Apache配置它才能通过网络从其他计算机访问我的存储库?请随意提供您认为相关的任何其他详细信息?
我现在的设置是笔记本电脑(Windows XP Pro)和虚拟机(Windows XP Pro).在我的虚拟机上,我有Apache 2.2,MySQL 5和PHP 5.虽然我很高兴听到偏离我的场景的示例/情况,但这个设置是我主要关注的问题.
所以我试图在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肯定不在任何地方的系统上.有什么建议?
我用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) 我用Apache2安装了django App,
1)虚拟主机:
<VirtualHost *:80>
ServerAdmin webadmin@publisy.com
ServerName alpha101.publisy.com
DocumentRoot /var/www/mysite
WSGIScriptAlias / /usr/local/django/mysite/apache/django.wsgi
Alias /static/ /var/www/mysite/media/static/
<Directory /var/www/mysite/media/static>
Order deny,allow
Allow from all
</Directory>
Alias /media/ /var/www/mysite/media/
<Directory /var/www/mysite/media>
Order deny,allow
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
2)wsgi脚本(位于/usr/local/django/mysite/apache/django.wsgi)
import os, sys
sys.path.append('/usr/local/django')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Run Code Online (Sandbox Code Playgroud)
任何人都可以说明出了什么问题?
在我的项目中,用户可以上传任何类型的文件.我需要确保安全性,防止执行上传的文件,这些文件可以通过php解析(*.php,*.html等)
有没有办法告诉apache不要用web/uploads中的php解析任何文件,只是将它们显示为纯文本?还有什么其他选择?
我目前正在研究Python和Django是否适合我将要开展的项目(到目前为止它看起来不错).作为测试的一种手段,我想使用mod_wsgi在实际服务器(ubuntu上的apache2)上运行python,但我无法使其工作.这是我的httpd.conf(位于/etc/apache2/httpd.conf):
WSGIScriptAlias /test/tc-test/ /var/www/stage/hello/tc-test/django.wsgi
WSGIPythonPath /var/www/stage/test/tc-test/
<Directory /var/www/stage/test/tc-test>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
Run Code Online (Sandbox Code Playgroud)
我的django.wsgi看起来如下:
import os
import sys
sys.path.append('/var/www/stage/test/tc-test')
os_environment['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Run Code Online (Sandbox Code Playgroud)
该目录的URL将是http://stage.website.com/test/tc-test
奇怪的是,当我重新启动apache服务器时,我不断收到500个内部服务器错误.不仅适用于该子目录,还适用于服务器上的所有其他子目录.我查看了apache错误日志,但由于某种原因,根本没有记录任何错误.我设法将罪魁祸首缩小到WSGIScriptAlias和WSGIPythonPath:当我删除它们时,500内部服务器错误消失,当我添加其中任何一个时,它们再次出现.我已经确认mod_wsgi的工作方式应该是这样,而且我可能看起来非常简单.我只是无法找出什么.对此有何帮助?
我正在从Apache 1.3迁移到Apache 2.063,并且无法使Apache :: VMonitor正常工作.
我尝试了这样的设置,类似于我在旧的Apache中设置的方式:
<Perl>
use Apache::VMonitor();
$Apache::VMonitor::Config{BLINKING} = 1;
$Apache::VMonitor::Config{refresh} = 0;
$Apache::VMonitor::Config{verbose} = 1;
$Apache::VMonitor::Config{system} = 1;
$Apache::VMonitor::Config{apache} = 1;
$Apache::VMonitor::Config{procs} = 1;
$Apache::VMonitor::Config{mount} = 1;
$Apache::VMonitor::Config{fs_usage} = 1;
$Apache::VMonitor::Config{apache_sort_by} = 'vsize';
$Apache::VMonitor::PROC_REGEX = join "\|", qw(.*)
</Perl>
<Location /vmonitor>
SetHandler perl-script
PerlHandler Apache::VMonitor
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from X.X.X.X ## really a valid IP
</Location>
Run Code Online (Sandbox Code Playgroud)
当我尝试启动我的服务器时,我收到此错误:
ap_scoreboard_image在......不存在
我在Apache :: VMonitor文档中找到了一条说明:
注意对于2.0.53之后的Apache版本(在2.0.54,2.0.55和2.0.58上验证),由于Apache初始化时的更改,在部分和/或PostConfigRequire文件中加载Apache :: VMonitor不起作用记分牌对象.
问题是它没有说我什么时候可以在更高版本的Apache中初始化记分板对象.我试图省略"use"语句并得到此错误:
恐慌:全局破坏期间的del_backref.
*错误代码255
有谁知道如何让这个工作?我并没有停留在使用Apache …
我正在使用Ubuntu 14.04和apache2以及ispconfig 3.就在几个小时前我不小心删了/ var/log/apache2文件夹包含文件,现在我的服务器无法重启apache2,我该如何恢复它们?或者,当重启服务器时,系统会自动创建该日志文件夹和文件吗?
当我重新启动apache2时
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:61
(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log
(2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /etc/apache2/sites-enabled/000-default.conf:1
AH00014: Configuration check failed
Action 'configtest' failed.
The Apache error log may have …Run Code Online (Sandbox Code Playgroud) 我在 Debian 上有一个 Apache 2,并且是一个初学者(新手)。当在网络浏览器中访问我的网络服务器时,我看到 Apache 默认欢迎页面:
我尝试显示我的真实网站(var/www/mywebsite.com/),而不是此页面(位于 var/www/html)。下面是我服务器上的树:
---- etc
-------- apache2
------------ sites-enabled
---------------- mywebsite.com.vhost -> etc/apache2/sites-available/mywebsite.com.vhost
------------ sites-available
---------------- mywebsite.com.vhost
---- var
-------- www
------------ mywebsite.com
---------------- web
-------------------- css/
-------------------- js/
-------------------- img/
-------------------- error/
-------------------- index.html
-------------------- robots.txt
Run Code Online (Sandbox Code Playgroud)
我的 .vhost 文件配置良好:
AllowOverride None
Require all denied
Run Code Online (Sandbox Code Playgroud)
DocumentRoot /var/www/mywebsite.com
ServerName mywebsite.com
ServerAlias www.mywebsite.com
ServerAdmin webmaster@mywebsite.com
ErrorLog /var/log/ispconfig/httpd/mywebsite.com/error.log
Alias /error/ "/var/www/mywebsite.com/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument …Run Code Online (Sandbox Code Playgroud)