Articles of configuration

Apache:在限制的位置取消限制文件

假设Apache在<Files> <Location>指令之后应用了<Location>指令,那么如何将一个“require all granted”应用于位置中的单个文件? 在下面的例子中,我想RSS的饲料是公开的,而其他一切都是有限的… 或者将这个改为一个<Directory>呢? 例: <Location "/doku"> Options FollowSymLinks Order deny,allow Allow from all AuthBasicProvider ldap AuthLDAPURL ——– AuthLDAPBindDN ——– AuthLDAPBindPassword ——- AuthType Basic AuthName "test" Require ldap-user user </Location> <Files "/doku/feed.php"> Allow from all require all granted </Files>

Centos MySQL优化4gb ram

我正在使用4gb ram的vps上使用Centos 6 64bit。 1个wordpress网站和2个壁纸脚本网站。 Wordrpess每天有10K次访问。 网站很慢。 在my.cnf #示例大型系统的mysqlconfiguration文件。 # #这是用于系统运行的大型系统,内存= 512M #MySQL。 # #你可以复制这个文件 #/etc/my.cnf设置全局选项, #mysql-data-dir / my.cnf设置服务器特定的选项(在这里 #安装这个目录是/ usr / local / mysql / var)或者 #〜/ .my.cnf设置用户特定的选项。 # #在这个文件中可以使用程序支持的所有长选项。 #如果您想知道程序支持哪些选项,请运行该程序 #with –help选项。 #以下选项将传递给所有MySQL客户端 [客户] #password = your_password 端口= 3306 socket = /tmp/mysql.sock #以下是一些特定程序的条目 #MySQL服务器 的[mysqld] 端口= 3306 socket = /tmp/mysql.sock 跳锁 set-variable = […]

FreeBSD 2网卡

我们有2台带有FreeBSD的网卡的服务器。 1卡用于互联网(工作正常)和另一个本地networking连接(到192.168.227.0/24网)。 当我尝试ping IP网关192.168.227.1本地networking时,我得到了消息“ping:发送到:主机已closures”。 网关是好的,在线 – 所有其他服务器(与Ubuntu)可以轻松地连接到这个networking。 所以也许我在我的configuration文件中有一些错误。 使用ifconfig: igb0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=1bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM, TSO4> ether 3c:d9:2b:f2:d1:f6 media: Ethernet autoselect (1000baseT <full-duplex>) status: active igb1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=1bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM, TSO4> ether 3c:d9:2b:f2:d1:f7 media: Ethernet autoselect status: no carrier em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_ MAGIC> ether 00:26:55:ea:e3:a6 inet 77.195.133.102 netmask […]

根据客户端IP而不是电子邮件地址的Postfix – 发件人相关configuration

使用Postfix,我想根据发件人IP设置传输。 有sender_dependent_default_transport_maps ,它根据发件人的电子邮件地址(信封MAIL FROM)。 有没有相同的configuration,但根据客户端IP? 或者我可以在此configuration中指定客户端IP而不是电子邮件地址? 注1:而不是default_transport和sender_dependent_default_transport_maps我也可以使用relayhost和sender_dependent_relayhost_maps 。 但是我需要通过客户IP来查找,而不是电子邮件地址。 注2:实际上,这些IP将匹配$mynetworks 。 所以,我真正需要的是像mynetworks_transport或client_ip_dependent_default_transport_mapsconfiguration。

在VirtualBox上设置CentOS / RHEL虚拟

我有一台运行红帽企业Linux服务器版本5.5(Tikanga)的物理服务器。 我想创build一个虚拟机(使用VirtualBox)和CentOS服务器的二进制兼容版本作为这个RHEL服务器版本,并且有几个问题: 我应该使用哪个版本的CentOS服务器来匹配RHEL 5.5? 在创build虚拟机之前,我们应该了解它们的特殊VBoxconfiguration(特殊驱动程序,设置等)(特定于RHEL / CentOS)吗? 如果CentOS无法做到这一点,是否还有其他可能的(免费)解决scheme? 例如,是否可以下载RHEL服务器5.5的试用/评估版本,制作一个映像,并将其用作虚拟?

使用时。 在configuration文件myhost.mydomain后?

我有时注意到了。 '可以看到在年底 myhost.mydomain 所以是 myhost.mydomain. ^^^ 声明。 我应该在哪里使用这个' 。 ' 最后? 目前在etc/hosts我不使用结尾'。' 也不是在本地主机名称,而且从来没有,我想。 何时何地需要 ? 如果不能直接回答,请给出一些链接

我怎样才能检查一个nginx模块是否通过nginxconfiguration安装?

我想要做的就是防止configuration段的无效指令在没有安装正确模块的nginx中运行。 像Apache中的IfModule指令( http://httpd.apache.org/docs/current/mod/core.html#ifmodule )。 在nginx中是否存在类似的东西?

与各种主机和HTTP / HTTPS的虚拟主机

我有我的vhosts.d目录下的文件,它被称为hosts.conf(从我收集的名称是不是一个问题)。 现在有各种主机,你可以看到,如果我使用http(端口80)没有任何问题,我可以从一个网站反弹到另一个,但如果我使用https(端口443)无论网站我在我的浏览器中键入我总是结束于首先与443端口列出的网站(在这种情况下为mobile-dev1。 * .it)。 显然我的真实文件没有*书面,但正确的网站名称。 <VirtualHost 10.65.200.7:80> DocumentRoot "/srv/www/htdocs/public" ServerName portal.***.it <Directory "/srv/www/htdocs/public"> allow from all </Directory> </VirtualHost> <VirtualHost 10.65.200.7:80> DocumentRoot /srv/mobile-dev1/public ServerName mobile-dev1.***.it <Directory /srv/mobile-dev1/public> allow from all Options +Indexes </Directory> </VirtualHost> <VirtualHost 10.65.200.7:443> DocumentRoot /srv/mobile-dev1/public ServerName mobile-dev1.***.it SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile /etc/ssl/certs/wildcard_***_it.pem SSLCertificateKeyFile /etc/ssl/private/wildcard_***_it.key SSLCertificateChainFile /etc/ssl/certs/RapidSSLCA.crt <Directory /srv/mobile-dev1/public> allow from all Options […]

CentOS6上的Httpd没有列出目录内容

我在Centos6.4服务器上有一个文件夹(不是传统的/ var / www / html文件夹!)/ Server / Websites / Default。 只有一个文件,phpinfo.php(其中有明显的代码)。 在Firefox中运行http://localhost/Default/phpinfo.php ,显示正确的PHP信息页面。 当我访问http://localhost/Default/页面时,它显示了一个禁止的'你没有权限访问/在这个服务器上。 页。 我想要它列出目录内容。 在我的/etc/httpd/conf/httpd.conf文件中,(显示时间太长,所以我粘贴了一些我认为重要的关键代码): DocumentRoot "/Server/Websites" <Directory /Server/Websites> Options +Indexes Includes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> SELinux聪明,我也为# getsebool -a | grep httpd # getsebool -a | grep httpd : allow_httpd_anon_write –> off allow_httpd_mod_auth_ntlm_winbind –> off allow_httpd_mod_auth_pam –> […]

Nginx + Gunicorn + Django – nginx不允许使用静态文件

更新的代码 – 这仍然不工作。 Settings.py STATIC_ROOT = '/home/ubuntu/virtualenv/mysite/homelaunch/static/' STATIC_URL = '/static/' nginx conf :: / etc / nginx / sites-enabled / mysite server { server_name ec2-xxxx.compute-1.amazonaws.com; access_log /home/ubuntu/virtualenv/mysite/error/access.log; error_log /home/ubuntu/virtualenv/mysite/error/error.log warn; connection_pool_size 2048; location /static/ { #alias /home/ubuntu/virtualenv/mysite/homelaunch/static/; #alias /static/; root /home/ubuntu/virtualenv/mysite/homelaunch/; } location / { proxy_pass http://127.0.0.1:8001; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #proxy_set_header X-Forwarded-Host […]