服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器
发送以ec2-user身份login到未知用户的邮件时: echo "Subject: test" | /usr/lib/sendmail -v abc 当redirect到导致外部服务器拒绝邮件的ec2用户的别名时, From:<>是空白的。 即使设置-f "ec2-user@internal"也不能修复它。 在我的/etc/aliases里面 root: webmaster@external ec2-user: webmaster@external 详细输出显示如下: abc… Connecting to [127.0.0.1] via relay… 220 internal ESMTP Sendmail 8.14.4/8.14.4; Thu, 24 Mar 2016 16:42:37 GMT >>> EHLO internal 250-internal Hello localhost [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-DELIVERBY 250 HELP […]
我正在尝试使用chillispot在openWRT中设置强制门户。 我的目标是有一个开放的networking,并显示一个静态的HTML信息,没有互联网连接,没有任何login。 当WRT路由器连接到互联网时,我已经在家工作了。 但是,我需要使用解决scheme,而无需连接到互联网。 我不知道这是否可能,因为没有互联网没有DNS解决scheme,chillispot不工作没有DNS。 也许有一个select使用IPtables或类似的东西来做一些事情,强迫networking中的所有stream量去一个单一的IP?
我正在使用PgBouncer进行连接池,在主从模式下使用本地psql复制,并使用PgPool2进行负载平衡。 经过几次(很多)试图让PgPool2打好,我放弃了。 对于许多不稳定的情况,请求被“卡住”,连接丢失,我尝试了所有可以pipe理的configuration,并且没有数量地读取文档,没有任何东西能够摆脱PgPool2在环境中引入的不稳定性。 我正在寻找替代品,我已经尝试HAProxy,但有围墙试图获得写查询主只。 有没有人知道另一个替代负载平衡psql在主从模式?
我在这里有一个django应用程序,它使用lighttpd反向代理。 我们最近把它移到了EC2上的一个弹性负载均衡器后面,而且我正在解决正确的configuration问题。 在我的例子中,我已经得到了Elastic Loadbalancer设置证书,并且代表一个lighttpd在80上侦听的单个实例接受80/443个请求,并且在9900端口上运行在apache上的应用逆向代理。通过端口80上的公共dns(ec2-blah-blah.amazonaws.com)对实例进行健康检查,用户通过app.example.com访问它。 我需要提供: redirect到https,通过http发送到除EC2公共DNS之外的任何主机的所有请求。 通过https向所有请求反向代理到127.0.0.1端口9900 反向代理到127.0.0.1端口9900的请求通过http到EC2仅公共DNS。 有人可以帮忙吗?
我正在尝试在Apache中configuration用户director /Users/username/Sites 。 如果我注释掉了PHP LoadModule,它可以正常工作,甚至可以加载PHP7。 问题是我需要使用PHP5,但是每当我取消注释PHP LoadModule我得到localhost refused to connect. ,当试图连接到localhost/~username/Sites/ 。 不过localhost独自提出了Apache It Works! 信息。 这是我的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.4/> for detailed information. # In particular, see # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> # for a […]
我有基于会话亲和力完美工作的apache2负载平衡。 stream量确实被定向到正确的Tomcat服务器。 我们正在尝试使用相同的服务器来为某些REST API调用提供服务。 这些调用没有会话,但是tomcat表示请求会保持某种状态,我们希望根据某个标头值将stream量redirect到同一个tomcat。 试图从Apache网站search和阅读文件,但还没有弄清楚。 我可以根据标题值进行负载平衡吗?
我试图通过一个nginx作为反向代理访问服务器上运行的多个docker集装箱。 每个容器都是独立的CMS。 有些是wordpress,有些是drupal等等。 我用以下命令启动容器: docker run -p 0.0.0.0:{$port}:80 -i -t loader-docker 这里最大的区别是我想通过一个path而不是一个子域访问每个容器。 例如: http : //example.com/docker-1 http://example.com/docker-2 我可以用下面的configuration很容易地做到这一点 server { listen 80; server_name example.com; location / {} location /docker-1/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass docker.server:8001; } location /docker-2/ { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header […]
我将Mautic安装在AWS服务器上,并且在端口80上工作正常。但是,在mautic.conf (位于/etc/apache2/sites-enabled/mautic.conf中)中更改为以下站点configuration以使用SSL 。 <VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/mautic/ ServerName xxxx.com ServerAlias xxxx.com DirectoryIndex index.php/ ErrorLog ${APACHE_LOG_DIR}/mautic-error_log CustomLog ${APACHE_LOG_DIR}/mautic-access_log common <Directory /var/www/html/mautic/> RewriteEngine on RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R] </Directory> </VirtualHost> <VirtualHost *:443> ServerAdmin [email protected] DocumentRoot /var/www/html/mautic/ ServerName xxxx.com ServerAlias xxxx.com DirectoryIndex index.php/ ErrorLog ${APACHE_LOG_DIR}/mautic-error_log CustomLog ${APACHE_LOG_DIR}/mautic-access_log common SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.crt SSLCertificateKeyFile […]
我build立了一个Jenkins的工作来运行aws命令。 当我执行构build时,它失败,错误消息是: + /usr/local/aws/bin/aws elasticbeanstalk describe-environments /tmp/hudson3332739386589747399.sh: 2: /tmp/hudson3332739386589747399.sh: /usr/local/aws/bin/aws: not found Build step 'Execute shell' marked build as failure 我不知道我在做什么错。 任何想法如何解决它?
我将这个URL cnonicalization添加到我的.htaccess文件中: RewriteEngine on RewriteCond %{HTTP_HOST} !^www.example.com [NC] RewriteRule ^/?(.*)$ http://www.example.com/$1 [L,R=301] 但现在我的子域shop.example.com正在redirect到www.example.com。 我怎样才能使shop.example.com工作,而不删除URL规范化? 我使用amazon web services。