我有点担心,因为它已经两天了,我的访问日志文件高达250MB +。 它是否滚动日志文件并删除它们? 我想只有1GB或更less的日志文件总数。
我在本地主机的子目录中设置多站点。 问题是,当我试图访问我刚刚创build的网站的仪表板(本地主机/ wptest /网站/ wp-admin),我得到“这个网页有一个redirect循环” ,当我尝试访问实际的网站localhost / wptest / site)页面加载但没有资产,如CSS。 当我访问networking仪表板或localhost / wptest上的主站点仪表板时,一切都很好。 另外当我编辑在networking仪表板的第二个网站的永久链接,就像这样:本地主机/网站它也运行良好。 如何使它与默认的永久链接结构localhost / wptest / site? wordpress文件在 /usr/share/html/wptest wp-config.php如下: define('WP_ALLOW_MULTISITE', true); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', false); define('DOMAIN_CURRENT_SITE', 'localhost'); define('PATH_CURRENT_SITE', '/wptest/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); 而服务器块/虚拟主机是这样的: server { ##DM – uncomment following line for domain mapping listen 80 default_server; #server_name example.com *.example.com ; ##DM […]
我有一个服务器,我想承载两个Web应用程序(例如一个站点和一个Web应用程序)和一个新手与Nginx(和WebHosting)。 我有: 一个Web服务器(可以使用http://server.name访问) 主站点地址(main.site.name或www.main.site.name)。 其内容位于/usr/share/nginx/www.main.site.name的服务器上 一个具有特定地址的networking应用程序(subdomain.other.site)。 它的内容在/usr/share/nginx/test的服务器上 我使用这个configuration我的主站点: server { server_name .main.site.name; root /usr/share/nginx/www.main.site.name; index index.html index.htm; location / { try_files $uri $uri/ /index.html; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } } 我使用这个configuration我的wab应用程序,但它不起作用: server { listen subdomain.other.site:80; server_name subdomain.other.site; root /usr/share/nginx/test; index index.html index.htm; location / { try_files […]
我已经安装了Nginx,php-fpm,mysql和phpmyadmin .. 当我inputmyserver.com时,我看到“Welcome to nginx!”。 但是当我键入myserver.com/phpmyadmin时,我得到:“没有指定input文件”。 我知道这可能是path上的一个问题,但我找不到在哪里…:S configuration文件: 在/ etc / nginx的/网站可用/默认 server { listen 80; ## listen for ipv4; this line is default and implied listen [::]:80 default_server ipv6only=on; ## listen for ipv6 root /usr/share/nginx/www; index index.php index.html index.htm; # Make site accessible from http://localhost/ server_name _; location / { try_files $uri $uri/ /index.html; […]
我已经使用NameCheap注册了一个域,并且已经设置了一个redirect到我的Web服务器。 直接访问服务器( http://1.2.3.4 )没问题,但是通过域名返回来自nginx的400 Bad Request 。 我可能做错了什么? 这里是nginxconfiguration文件的相关部分。 server { listen 80; server_name localhost mydomain.org www.mydomain.org; location /tile/ { proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:20008; } location /datasource/ { proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:20008; } location /maps { alias /usr/share/nginx/www/Project-OSRM-Web/WebContent/; } location /tilemill { rewrite ^(.*)$ http://<myhardcoded IP address>:5002 permanent; } location / { alias […]
我只是在我的networking服务器上设置nginx,并创build了一个用户帐户(nginx)。 但是,它默认运行其工作进程作为www-data。 使用万维网数据有什么不利之处,还是应该离开呢? 谁应该归档? 此外,主进程是由根拥有(打开套接字,我相信)。 这是否有任何伤害,是否更好地给nginx(或www数据,但我不怀疑)用户sudo权限? 另外,除了locking用户和文件权限之外,还有什么我应该做的以保护服务器? 我还没有安装PHP或MySQL,我会担心在安装时保证这些安全。 谢谢你的帮助; 我发现到目前为止的networking服务器设置指南没有任何权限的指导方针,但我确定我需要与他们做一些事情。
我试图在我的根服务器上configuration一个子域名。 因为我想在端口80上使用这个子域名,我添加了另一个服务器块到相应的configuration文件。 每次我开始nginx现在我得到以下错误: nginx: [warn] conflicting server name "domain.de" on 0.0.0.0:80, ignored 这是我的configuration文件: server { listen 80; server_name domain.de *.domain.de; rewrite ^(.*) http://domain.de$1 permanent; } server { listen 80; server_name domain.de; root /var/www_80; […] } server { listen 80; ## listen for ipv4; this line is default and implied server_name cdn.domain.de; root /var/domain_streams; […] } […]
我在4个不同的实例上设置了4个在4个nginx服务器上运行的域/子域: – www.example.com – ai.example.com – cms.example.com – submissions.example.com 我已经从godaddy购买了这些子域名的UCC多域名证书 这些子域名中的每一个托pipe在一个单独的服务器上如何生成一个csr,它将为不同服务器上的每个子域 我现在所拥有的CSR是为根域'example.com',但它似乎并没有工作只在子域服务器(aws实例),我已经生成了csr,但没有在另一个实例上的另一个子域,即使我有将子域添加到SAN
我厌倦了这个糟糕的机器人,蜘蛛,爬行器和收割机。 我已经configuration我的服务器阻止连接IP 5分钟和maxretry 250使用fail2ban。 但是仍然有一部分人在250分钟内无法拦截,因为他们在5分钟内没有访问250个以上。 这是我的jail.localconfiguration: [http-get-dos] enabled = true filter = http-get-dos logpath = /var/log/ispconfig/httpd/*/access.log maxretry = 250 findtime = 300 #ban for 10 hours bantime = 36000 action = iptables-multiport[name=HTTP, port="http,https", protocol=tcp] cloudflare-blacklist sendmail-whois[name=HTTP, [email protected]] 这里是http-get-dos.conffilter文件: [Definition] failregex = ^<HOST> -.*"(GET|POST) ignoreregex = 可以阻止这个爬虫的教程的大部分是使用Apache。 但是因为我使用nginx,所以我不能使用它们。 这是我find的一个教程 。 这里是这个机器人的例子日志: 220.225.127.41 – – [24/Jul/2013:00:00:19 +0800] […]
我目前讨价还价的CDN在videocaching方面performance非常差。 更糟糕的是,我没有任何访问权限。 所以我想知道是否有可能重写某些文件types的URL到我的服务器的IP地址,而不是CDN服务器? 在Apache中应该是这样的: https : //stackoverflow.com/questions/7154666/apache-mod-rewrite-redirect-file-type-to-another-domain