Articles of configuration

如何使用NGINX作为传统(Apache)Web服务器的前端

我有一个已经托pipe两个应用程序的NGINX服务器设置,并在该NGINX服务器上设置了SSL。 现在,我需要将NGINX服务器设置为传统Apache应用程序的前端,以便传统应用程序提供的服务可以通过SSL / HTTPS访问。 如何将我的NGINX服务器configuration为传统应用程序的“传递”服务器?

configuration所有主机,然后创build所有主机的configuration列表?

我用Ansible部署了大量的主机 – 这非常好用。 每个主机都有自己的设置和configuration。 现在我想为另一个使用这些主机的系统生成一个configuration文件。 为此,我需要为每个主机生成一个configuration(configuration数据库的configuration)的一部分。 以下是两台主机具有不同configuration的情况以及另一个使用Ansible生成configuration的一部分的系统的示例: 主机1 可靠的configurationdbA 主机2 可靠的configurationdbQ 另一个系统: host1 = dbA host2 = dbQ 这些值的计算方式是不同的(如dbQ而不是dbB ,例如host2 ),如果它属于不同的集群等,从host_vars只读出主机configuration是host_vars 。 我相信我需要迭代主机,并让Ansible找出像部署时那样的variables的计算值,但是我不知道如何将结果放在一个模板中。 请指教 :)

Nginx + Apache mod_wsgi,麻烦了解如何configuration服务器

我一直试图在Ubuntu 12.04上设置一个开发环境太久。 我的意图是在后面的生产环境中设置一切,所以我按照这个教程来学习如何将Nginx设置为Apache 2的反向代理。 我一直在寻找,我的问题与这个问题非常相似,但没有给出答案,我不能评论它来增加我的一些研究。 让我们进入文件: Apache和wsgi 首先,我从apt-get安装了mod_wsgi,然后在/ etc / apache2 / sites-available中创build了一个mysite文件: <VirtualHost *:8080> ServerAdmin [email protected] ServerName mysite.dev ErrorLog /path/to/developmentfolder/mysite/logs/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel debug CustomLog /path/to/developmentfolder/mysite/logs/access.log combined WSGIDaemonProcess mysite WSGIProcessGroup mysite WSGIScriptAlias / /path/to/developmentfolder/mysite/apache/django.wsgi <Directory /path/to/developmentfolder/mysite/apache> Order allow,deny Allow from all </Directory> </VirtualHost> […]

Laravel 4.1上的nginx路由错误404

我在nginx服务器上遇到了laravel的路由问题。 它显示了一个“404找不到”的所有路线,除了默认的,非常类似于这个问题: https : //stackoverflow.com/questions/21091405/nginx-configuration-for-laravel-4 解决这个问题的方法: 服务器{ 听80; server_name sub.domain.com; 设置$ root_path'/ srv / www / htdocs / application_name / public'; root $ root_path; index index.php index.html index.htm; try_files $ uri $ uri / @rewrite; 位置@rewrite { 重写^ /(。*)$ /index.php?_url=/$1; } 位置〜\ .php { fastcgi_pass 127.0.0.1:9000; fastcgi_index /index.php; 包括/ etc / nginx / fastcgi_params; fastcgi_split_path_info […]

Nginx和Django使用www前缀域

试图了解如何强制www。 在我的域名并redirect像ww.example.com或test.example.com – > www.example.com 一切正常,当我去www.example.com或example.com,我只是试图掩盖自己,如果人们尝试去错误的领域,我不应该添加任何比'www.example.com'和' example.com'在我的django ALLOWED_HOSTS 我把所有东西都按照: 如何使用Django的一键安装图像 upstream app_server { server 127.0.0.1:9000 fail_timeout=0; } server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.html index.htm; client_max_body_size 4G; server_name _; keepalive_timeout 5; # Your Django project's media files – amend as required location /media { alias /home/django/django_project/django_project/media; } # your […]

如何获得exim4的smtp和pop3 / imap服务器名称和设置?

我在/etc/exim/exim4.conf缺lessexim4configuration文件。 dpkg-reconfigure exim4-config运行正常,发送/接收邮件也可以。 我只是不知道configuration保存在哪里。 主要的是我需要找出填充到Thunderbird的设置电子邮件字段(到smtp字段和imap / pop3字段),因为我找不到我的smtp和imap / pop3服务器的名称。 我可以在哪里得到它? 编辑:我已经设置mail.example.com当我运行configuration,但设置这个雷鸟不起作用。 EDIT2:在/etc/exim4/update-exim4.conf.conf我发现了一些configuration,但没有关于smtp / imap / pop3: dc_eximconfig_configtype='internet' dc_other_hostnames='example.com; localhost' dc_local_interfaces='<MY_IP_ADDRESS> ; 127.0.0.1 ; ::1' dc_readhost='' dc_relay_domains='' dc_minimaldns='false' dc_relay_nets='' dc_smarthost='' CFILEMODE='644' dc_use_split_config='false' dc_hide_mailname='' dc_mailname_in_oh='true' dc_localdelivery='mail_spool'

漫游用户的login时间非常长

我的networking上有一个漫游用户偶尔会遇到日志logging时间有时会超过40分钟的情况。 经过一个月的努力,并学会了我能解决这个问题的原因,是由于NTUSER.DAT文件被反复复制到prfXX.tmp文件中(x是随机数)。根据我读的微软信息当漫游用户注销时,临时文件复制当前的漫游configuration文件信息,然后覆盖服务器上存储的版本,完成后自行删除。 如果某些事情中断了进程,或者不放弃漫游configuration文件,则临时文件不会写入服务器副本,而只是将自身保存到用户的configuration文件中。 这篇文章在这里看到… http://support2.microsoft.com/?kbid=328607 我正在创build这个post,看看是否有其他人有这个问题。 如果是这样,什么可能导致挂断? 我的第一个猜测是用户感到沮丧和closures计算机,而不是等待login或注销过程。 不过,我知道除了这个人之外,还有其他人不会看到这个问题。 有没有已知的程序拒绝“放手”的漫游configuration文件? 我已经重新创build了configuration文件,并更换了电脑,没有任何改变。 任何input将不胜感激。 对于技术信息来说,我们有一个XP,7和一些8.1计算机的混合环境。 据我所知,用户只使用XP。 我们当前的域控制器运行在Windows Server 2012上。我们以前的域控制器运行的是Server 2003,并且当前用作备份控制器。

通过脚本设置TMG报告服务器

我正在使用VBScript在服务器负载上configurationTMG。 似乎没有办法通过脚本设置报表服务器。 我已经看了FPCRoot对象和FPCReports对象没有明确的方式来设置此属性。 手动步骤/ TechNet版本 日志和报告(左侧窗格) 报告标签(中央窗格) 任务选项卡>configuration报告设置(右窗格) 报表服务器选项卡 报表服务器下拉菜单 这不可能吗? 还有其他的方法可以应用这个设置吗?

在*之前,nginx匹配127.0.0.1

我有以下两个服务器指令设置包括conf.d / *。conf。 当我通过公共的外部IP地址导航到服务器时,它似乎与127.0.0.1的服务器匹配,因为一个条目被添加到localhost.access_log文件中。 我期望这只会发生在通过本地主机访问。 我希望从外部IP匹配.host.tld server_name指令或default_server参数。 我需要确保订单如何加载conf文件? 为什么127.0.0.1上的监听是这样匹配的呢? 它是第二个位置指令是空的吗? server { listen 127.0.0.1; server_name localhost; access_log /var/log/nginx/localhost.access_log main; error_log /var/log/nginx/localhost.error_log info; root /var/www/localhost/htdocs; } server { listen 80 default_server; server_name .host.tld; access_log /var/log/nginx/host.access_log main; error_log /var/log/nginx/host.error_log info; root /var/www/host/htdocs; location = / { index index.php index.html; } location / { } }

用于多个子域的Nginx服务器块

我有以下主机名结构: main.domain.com是主要的子域,是静态的; 任何其他子域名都是dynamic*.domain.com 所有主机名的根目录都是一样的。 现在会发生什么情况:当我访问fruit.domain.com其redirect到main.domain.com ,但实际上应该保留在fruit.domain.com 。 我的configuration: server { listen 80; listen [::]:80; server_name main.domain.com *.domain.com; return 301 https://$server_name$request_uri; } server { listen 443 default_server ssl spdy; server_name main.domain.com *.domain.com; root /home/www/app … }