小编Phi*_*ich的帖子

Nginx 为每个域提供单独的访问日志

我将 Nginx 与 Typo3 结合使用。我的 Typo3 安装有大约 8 个域。一切都像魅力一样。现在我遇到的问题是,我想使用适用于每个域的 AWStats,但我不知道如何分离每个域的访问日志。在下面您可以看到我的配置实际运行情况:

里面的配置文件sites-available

server {
    listen        127.0.0.1:80;
    server_name    www.domain1.de
                       www.domain2.de
                       www.domain3.de
    root        "/var/www/oz/htdocs/";
    disable_symlinks if_not_owner;
    location ~ /\.ht {
        deny all;
    }

    location ~ ^/cgi-bin/ {
        deny all;
    }


    # PHP is enabled
    index index.php index.html index.htm;
    location ~ \.php(/|$) {
        try_files $fastcgi_script_name =404;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include /etc/nginx/fastcgi_params;
        set $path_info $fastcgi_path_info;
        fastcgi_param PATH_INFO $path_info;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_index index.php;
        fastcgi_pass unix:/var/www/oz/conf/sockets/nginx-php-fcgi.sock;
        fastcgi_read_timeout 300;
               fastcgi_buffer_size 128k;
               fastcgi_buffers 256 4k;
               fastcgi_busy_buffers_size 256k; …
Run Code Online (Sandbox Code Playgroud)

awstats access-log typo3-6.2.x

3
推荐指数
1
解决办法
5778
查看次数

标签 统计

access-log ×1

awstats ×1

typo3-6.2.x ×1