- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
这是位于用户 directAdmin 目录中的 httpd.conf 文件
# Auto generated apache config file by DirectAdmin version 1.42.1
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to his/her website
# For global config changes that affect all Users, see this guide:
# http://help.directadmin.com/item.php?id=2
# For local config changes that only affect one User, see this guide:
# http://help.directadmin.com/item.php?id=3
# Frontpage requires these parameters in every httpd.conf file or else
# it won't work.
ServerRoot /etc/httpd
<VirtualHost 91.239.206.147:80 >
ServerName www.duri.ge
ServerAlias www.duri.ge duri.ge
Alias /media/ /home/duri/domains/duri.ge/public_html/media/
Alias /static/ /home/duri/domains/duri.ge/public_html/assets/
<Directory /home/duri/domains/duri.ge/public_html/assets>
Order deny,allow
Allow from all
</Directory>
<Directory /home/duri/domains/duri.ge/public_html/media>
Options +Includes +Indexes
Order deny,allow
Allow from all
</Directory>
WSGIScriptAlias / /home/duri/domains/duri.ge/python/sites/duri.ge/duri/wsgi-production.py
WSGIDaemonProcess duri.ge user=duri group=duri python-path=/home/duri/domains/duri.ge/python/sites/duri.ge:/home/duri/domains/duri.ge/python/virtualenvs/duri_env/lib/python2.7/site-packages
WSGIProcessGroup duri.ge
<Directory /home/duri/domains/duri.ge/python/sites/duri.ge/duri>
<Files wsgi-production.py>
Order deny,allow
Allow from all
</Files>
</Directory>
ServerName www.duri.ge
ServerAlias www.duri.ge duri.ge
ServerAdmin webmaster@duri.ge
DocumentRoot /home/duri/domains/duri.ge/public_html
UseCanonicalName OFF
<IfModule !mod_ruid2.c>
SuexecUserGroup duri duri
</IfModule>
<IfModule mod_ruid2.c>
RMode config
RUidGid duri duri
RGroups apache access
</IfModule>
CustomLog /var/log/httpd/domains/duri.ge.bytes bytes
CustomLog /var/log/httpd/domains/duri.ge.log combined
ErrorLog /var/log/httpd/domains/duri.ge.error.log
<Directory /home/duri/domains/duri.ge/public_html>
Options +Includes -Indexes
php_admin_flag safe_mode OFF
php_admin_flag engine OFF
php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f duri@duri.ge'
php_admin_value open_basedir /home/duri/:/tmp:/var/tmp:/usr/local/lib/php/
</Directory>
</VirtualHost>
<VirtualHost 91.239.206.147:80>
ServerName www.mywedding.duri.ge
ServerAlias www.mywedding.duri.ge mywedding.duri.ge
DocumentRoot /home/duri/domains/duri.ge/public_html/mywedding
ErrorLog /var/log/httpd/domains/duri.ge.mywedding.error.log
CustomLog /var/log/httpd/domains/duri.ge.mywedding.bytes bytes
CustomLog /var/log/httpd/domains/duri.ge.mywedding.log combined
</VirtualHost>
#<VirtualHost 91.239.206.147:80 >
#Alias /media/ /home/duri/domains/duri.ge/public_html/media/
#Alias /static/ /home/duri/domains/duri.ge/public_html/assets/
#<Directory /home/duri/domains/duri.ge/public_html/assets>
# Order deny,allow
# Allow from all
#</Directory>
#<Directory /home/duri/domains/duri.ge/public_html/media>
# Options +Includes +Indexes
# Order deny,allow
# Allow from all
#</Directory>
#WSGIScriptAlias / /home/duri/domains/duri.ge/python/sites/duri.ge/duri/wsgi-production.py
#WSGIDaemonProcess duri.ge user=duri group=duri python-path=/home/duri/domains/duri.ge/python/sites/duri.ge:/home/duri/domains/duri.ge/python/virtualenvs/duri_env/lib/python2.7/site-packages
#WSGIProcessGroup duri.ge
# <Directory /home/duri/domains/duri.ge/python/sites/duri.ge/duri>
# <Files wsgi-production.py>
# Order deny,allow
# Allow from all
# </Files>
# </Directory>
# ServerName www.mywedding.duri.ge
# ServerAlias www.mywedding.duri.ge mywedding.duri.ge
# ServerAdmin webmaster@duri.ge
# DocumentRoot /home/duri/domains/duri.ge/public_html/mywedding
# UseCanonicalName OFF
# <IfModule !mod_ruid2.c>
# SuexecUserGroup duri duri
# </IfModule>
# <IfModule mod_ruid2.c>
# RMode config
# RUidGid duri duri
# RGroups apache access
# </IfModule>
# CustomLog /var/log/httpd/domains/duri.ge.mywedding.bytes bytes
# CustomLog /var/log/httpd/domains/duri.ge.mywedding.log combined
# ErrorLog /var/log/httpd/domains/duri.ge.mywedding.error.log
# <Directory /home/duri/domains/duri.ge/public_html/mywedding>
# Options +Includes -Indexes
# php_admin_flag safe_mode OFF
# php_admin_flag engine OFF
# php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f duri@duri.ge'
# php_admin_value open_basedir /home/duri/:/tmp:/var/tmp:/usr/local/lib/php/
# </Directory>
#</VirtualHost>
#<VirtualHost 91.239.206.147:80 >
#Alias /media/ /home/duri/domains/duri.ge/public_html/media/
#Alias /static/ /home/duri/domains/duri.ge/public_html/assets/
#<Directory /home/duri/domains/duri.ge/public_html/assets>
# Order deny,allow
# Allow from all
#</Directory>
#<Directory /home/duri/domains/duri.ge/public_html/media>
# Options +Includes +Indexes
# Order deny,allow
# Allow from all
#</Directory>
#WSGIScriptAlias / /home/duri/domains/duri.ge/python/sites/duri.ge/duri/wsgi-production.py
#WSGIDaemonProcess duri.ge user=duri group=duri python-path=/home/duri/domains/duri.ge/python/sites/duri.ge:/home/duri/domains/duri.ge/python/virtualenvs/duri_env/lib/python2.7/site-packages
#WSGIProcessGroup duri.ge
# <Directory /home/duri/domains/duri.ge/python/sites/duri.ge/duri>
# <Files wsgi-production.py>
# Order deny,allow
# Allow from all
# </Files>
# </Directory>
# ServerName www.test.duri.ge
# ServerAlias www.test.duri.ge test.duri.ge
# ServerAdmin webmaster@duri.ge
# DocumentRoot /home/duri/domains/duri.ge/public_html/test
# UseCanonicalName OFF
# <IfModule !mod_ruid2.c>
# SuexecUserGroup duri duri
# </IfModule>
# <IfModule mod_ruid2.c>
# RMode config
# RUidGid duri duri
# RGroups apache access
# </IfModule>
# CustomLog /var/log/httpd/domains/duri.ge.test.bytes bytes
# CustomLog /var/log/httpd/domains/duri.ge.test.log combined
# ErrorLog /var/log/httpd/domains/duri.ge.test.error.log
# <Directory /home/duri/domains/duri.ge/public_html/test>
# Options +Includes -Indexes
#
# php_admin_flag safe_mode OFF
#
# php_admin_flag engine OFF
# php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f duri@duri.ge'
# php_admin_value open_basedir /home/duri/:/tmp:/var/tmp:/usr/local/lib/php/
# </Directory>
#</VirtualHost>
这是位于/etc/httpd/conf 中的 httpd.conf
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
ServerRoot "/etc/httpd"
Listen 80
#LoadModule dummy_module /usr/lib/apache/mod_dummy.so
#LoadModule php5_module /usr/lib/apache/libphp5.so
LoadModule ruid2_module /usr/lib/apache/mod_ruid2.so
Include /etc/httpd/conf/extra/httpd-phpmodules.conf
#LoadModule SocketPolicyServer /usr/lib/apache/mod_socket_policy_server.so
#LoadModule socket_policy_server_module /usr/lib/apache/mod_socket_policy_server.so
LoadModule wsgi_module /usr/lib/apache/mod_wsgi.so
User apache
Group apache
ServerAdmin admin@localhost
DocumentRoot "/var/www/html"
# Options and AllowOverrides
Include conf/extra/httpd-directories.conf
<IfModule dir_module>
DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
ErrorLog /var/log/httpd/error_log
LogLevel warn
<IfModule log_config_module>
#replace %b with %O for more accurate logging
<IfModule mod_logio.c>
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%O %I" bytes
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog /var/log/httpd/access_log common
</IfModule>
<IfModule alias_module>
# Include some DirectAdmin alias
Include conf/extra/httpd-alias.conf
</IfModule>
DefaultType text/plain
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-gzip .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType video/x-ms-asf .avi
AddType video/mpeg .mpg
AddType video/mpeg .mpeg
AddType video/quicktime .mov
AddType video/x-ms-wmv .wmv
</IfModule>
#EnableMMAP off
#EnableSendfile off
#######################################################################################
# For user configurations not maintained by DirectAdmin. Empty by default.
#######################################################################################
Include conf/extra/httpd-includes.conf
#######################################################################################
# Do not change anything in included files, because they are rewritten by DirectAdmin #
#######################################################################################
# This is needed for PHP
Include conf/extra/httpd-php-handlers.conf
# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf
# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf
# Fancy directory listings
Include conf/extra/httpd-autoindex.conf
# Language settings
Include conf/extra/httpd-languages.conf
# User home directories
#Include conf/extra/httpd-userdir.conf
# Real-time info on requests and configuration
Include conf/extra/httpd-info.conf
# Virtual hosts
Include conf.d/wsgi.conf
# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV)
Include conf/extra/httpd-dav.conf
# Various default settings
Include conf/extra/httpd-default.conf
# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
# Deflate module settings
Include conf/extra/httpd-deflate.conf
# All the DirectAdmin vhosts
Include conf/extra/directadmin-vhosts.conf
# All suPHP directives
#Include conf/extra/httpd-su[5~php.conf
#######################################################################################
# End of included files that are rewritten by DirectAdmin #
#######################################################################################
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
#<IfModule mod_socket_policy_server.c>
#Listen 8889
#<VirtualHost *:8889>
# SocketPolicyServer On
# SocketPolicyFile /var/www/html/crossdomain.xml
# AdobePolicyFileServerEnabled On
#</VirtualHost>
# </IfModule>
首先在 root 上有一个 python 代码。然后通过 directAdmin 我添加了两个子域,test 和 mywedding 以便与 php 一起使用。
问题是如果我不评论那些新添加的行,apache 将不会启动。然后我直接添加了virtualhost,没有directAdmin。
<VirtualHost 91.239.206.147:80>
ServerName www.mywedding.duri.ge
ServerAlias www.mywedding.duri.ge mywedding.duri.ge
DocumentRoot /home/duri/domains/duri.ge/public_html/mywedding
ErrorLog /var/log/httpd/domains/duri.ge.mywedding.error.log
CustomLog /var/log/httpd/domains/duri.ge.mywedding.bytes bytes
CustomLog /var/log/httpd/domains/duri.ge.mywedding.log combined
</VirtualHost>
这一行,但问题是子域“mywedding.duri.ge”不断重定向到(不是通过 http,而是在内部)python。
最佳答案
您的第一个虚拟主机 block 没有定义 ServerName,因此它无法知道哪些请求是针对它的,哪些请求是针对下一个虚拟主机 block 的。由于它无法区分,因此它接受并响应所有请求。添加一个与第二个 block 中的服务器名称(和别名)不同的服务器名称。
参见文档 here .
IP-based virtual hosts use the IP address of the connection to determine the correct virtual host to serve. Therefore you need to have a separate IP address for each host. With name-based virtual hosting, the server relies on the client to report the hostname as part of the HTTP headers. Using this technique, many different hosts can share the same IP address.
下面是一个虚拟主机示例,它对向 www.example.com
和 www.another.com
发出的请求做出不同的响应。希望你能找到你的问题:
# This line is probably in /etc/apache2/ports.conf, if it is uncommented you do
# not need to repeat it.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /tmp/example.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /tmp/example.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.another.com
DocumentRoot /tmp/another.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /tmp/another.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
我放了两个文件,一个在/tmp/example.com/index.html
,另一个在/tmp/another.com/index.html
内容。当我请求文件时,我能够看到不同的内容:
$ curl http://www.another.com/index.html
another
$ curl http://www.example.com/index.html
example
您需要将这些条目添加到您的 /etc/hosts
文件才能发出请求:
127.0.0.1 www.example.com www.another.com
关于apache - HTTPD 与其他虚拟主机冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24429442/
我的工作是将每条记录写入 Hadoop 映射中的 DynamoDB。 我无法使用具有 httpclient-4.2.5.jar 和 httpcore-4.2.5.jar 的 Hadoop 2.6 运行
我在 JavaScript 中嵌套了循环开关,例如: for (var i = 0; i < checkBoxIds.length; i++) { if ($('#' + checkB
我有一个文件夹被重命名的分支。现在我正在尝试合并从主干到这个分支的更改,但是在主干中修改的文件仍然在原始文件夹名称下,因此 svn 引发了树冲突。我该如何解决这个问题? 该文件夹已使用 svn ren
我在使用 jquery 暴露插件和 Masked 输入插件时遇到了问题。问题是它们都占用 $.mask 函数,从而导致冲突。但我非常需要这两个插件一起工作。我会将其中一个中的 $.mask 重命名为.
我正在尝试为我所有的 INPUT 元素做一个简单的 :focus 效果,就像这样: INPUT:focus { border-color: orange; } 这很好用,直到我将这段 CSS 添加到样
我是 javascript 的新手。 在 wordpress 上工作,我在自定义 js 中为我的主题输入了以下函数: document.getElementsByName("empty_cart")[
为什么有些 javascript 会与其他的发生冲突?我的意思是我一直在为图片库使用 javascript 代码,然后尝试在 jquery 中获取文本水印。为什么在使用 jquery 之后,画廊完全消
是否可以根据已知的输入值创建 MD5 碰撞? 所以例如我有输入字符串 abc与 MD5 900150983cd24fb0d6963f7d28e17f72 . 现在我想将字节添加到字符串 def获得相同
我在我的项目中使用原型(prototype): NodeParser.prototype.getChildren = function(parentContainer) { return fl
根据我对 merge 冲突的理解,当两个人更改了同一文件和/或修改了该文件中的同一行时,就会发生 merge 冲突。所以当我做一个 git pull origin master 我期望 merge 冲
iPad 上 Mobile Safari 中的 HTML5 模板。带 iScroll 的 Div 工作正常。 if/else 语句中还包含一个 jQuery 函数。该函数测试用户是否在 iScroll
我一直在尝试使 2 个脚本(1 个 mootol 和 1 个 jquery)在同一页面上工作,但没有成功。我一直在研究许多论坛等,但我仍然无法使这两个脚本同时工作。 这就是它在我的标题中的样子: /w
我想克隆带标题的问号。一切正常,但是当我将鼠标悬停在新问号上时,第一个问号上会出现工具提示。有什么想法吗? 我正在使用 jQuery 和醉酒的工具提示。 Demo here click here
好吧,我已经在一个 friend 的网站上工作了一段时间了。我的编码技能......值得怀疑,而且我遇到了很多问题。 目前我网站上的 jQuery 停止工作了,我找不到原因,并且我已尽一切努力让它工作
我想使用一个文件来保存所有#define 和常量:示例 #ifndef CONSTANTS_H_ #define CONSTANTS_H_ #include //OVERALL DEFS
我在我的表单中的所有 HTML 下都有一些验证码,这似乎阻止了我的复选框验证码的工作,一旦我在我的 HTML 下的代码周围添加/* */(使其不活动),我就得出了这个结论) 复选框验证代码开始正常工作
我是新手。我的页面上有两个 javascript/jquery。如果我使用第一个脚本,第二个脚本将不起作用。如果我删除第一个脚本,第二个脚本就可以正常工作。我不知道如何解决这个问题。我知道有一个“无冲
我是 Bison 新手,在处理 Shift/Reduce 冲突时遇到了麻烦... 我正在为C语言编写语法规则:ID是标识变量的标记,我编写此规则是为了确保即使将标识符写在括号中,也可以考虑它。 id
我目前正在使用 LibGdx 开发我的第一个 Android 游戏项目。这是一款 2D 迷宫游戏,您可以使用触摸输入从其中一个入口到其中一个导出“画出”一条线。世界本身是一个 TiledMap,目前仅
我正在尝试通过 javascript 完成表单验证,并在 #form# 标记中放置一个要执行的 .py 文件操作。但问题是,当我提交数据后,它不会重定向到 .py 操作。所以我摆脱了 preventd
我是一名优秀的程序员,十分优秀!