perfect-server-debian-squeeze-debian-6.0-with-bind-dovecot-and-nginx

Discussion in 'Installation/Configuration' started by maumar, Oct 19, 2012.

  1. maumar

    maumar New Member HowtoForge Supporter

    I am very confused about this howto.
    I am here

    12 Install Nginx, PHP5 (PHP-FPM), And Fcgiwrap

    now i shoul dinstall nginx, but DotDeb source is suggested, it;s ok.
    I add dotdeb like in the bottom of the page is suggested:
    Code:
    Add: deb http://php53.dotdeb.org squeeze all 
    
    and nginx is installed, that one of dotdeb.

    Now i should purge apache2*.*
    I get an error:

    Code:
    
    11:35:14 root@server /etc/apt # apt-get purge apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     apache2.2-common : Depends: apache2-utils but it is not going to be installed
    E: Broken packages
    
    To get rid of this error I have to comment dotdeb source into sources.list.
    Code:
    # deb http://php53.dotdeb.org squeeze all 
    
    My question is:

    should I re-enable it for the other packages?
    like php5-fpm, all php5, php-apc?

    Only nginx should come from dotdeb?

    If I let it without dotdeb then I will have trouble next, during upgrade; do have that source always there or have you removed it after installing nginx?
    Which is the rigth way ?
     
  2. maumar

    maumar New Member HowtoForge Supporter

    I have re-enabled dotdeb and installed php-pfm

    Code:
    15:29:18 root@template /etc/apt # apt-get install php5-fpm
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following package was automatically installed and is no longer required:
      php5-suhosin
    Use 'apt-get autoremove' to remove them.
    The following extra packages will be installed:
      php5-cgi php5-cli php5-common php5-gd php5-imap php5-mcrypt php5-mysql
    The following NEW packages will be installed:
      php5-fpm
    The following packages will be upgraded:
      php5-cgi php5-cli php5-common php5-gd php5-imap php5-mcrypt php5-mysql
    7 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
    Need to get 13.6 MB of archives.
    After this operation, 12.4 MB of additional disk space will be used.
    Do you want to continue [Y/n]? 
    Get:1 http://php53.dotdeb.org/ squeeze/all php5-cli amd64 5.3.18-1~dotdeb.0 [3205 kB]
    Get:2 http://php53.dotdeb.org/ squeeze/all php5-cgi amd64 5.3.18-1~dotdeb.0 [6402 kB]                                                                                                                                           
    Get:3 http://php53.dotdeb.org/ squeeze/all php5-mysql amd64 5.3.18-1~dotdeb.0 [67.4 kB]                                                                                                                                         
    Get:4 http://php53.dotdeb.org/ squeeze/all php5-mcrypt amd64 5.3.18-1~dotdeb.0 [15.2 kB]                                                                                                                                        
    Get:5 http://php53.dotdeb.org/ squeeze/all php5-imap amd64 5.3.18-1~dotdeb.0 [35.2 kB]                                                                                                                                          
    Get:6 http://php53.dotdeb.org/ squeeze/all php5-gd amd64 5.3.18-1~dotdeb.0 [98.4 kB]                                                                                                                                            
    Get:7 http://php53.dotdeb.org/ squeeze/all php5-common amd64 5.3.18-1~dotdeb.0 [491 kB]                                                                                                                                         
    Get:8 http://php53.dotdeb.org/ squeeze/all php5-fpm amd64 5.3.18-1~dotdeb.0 [3252 kB]                                                                                                                                           
    Fetched 13.6 MB in 37s (363 kB/s)                                                                                                                                                                                               
    Reading changelogs... Done
    (Reading database ... 37620 files and directories currently installed.)
    Preparing to replace php5-cli 5.3.3-7+squeeze14 (using .../php5-cli_5.3.18-1~dotdeb.0_amd64.deb) ...
    Unpacking replacement php5-cli ...
    Preparing to replace php5-cgi 5.3.3-7+squeeze14 (using .../php5-cgi_5.3.18-1~dotdeb.0_amd64.deb) ...
    Unpacking replacement php5-cgi ...
    Preparing to replace php5-mysql 5.3.3-7+squeeze14 (using .../php5-mysql_5.3.18-1~dotdeb.0_amd64.deb) ...
    Unpacking replacement php5-mysql ...
    Preparing to replace php5-mcrypt 5.3.3-7+squeeze14 (using .../php5-mcrypt_5.3.18-1~dotdeb.0_amd64.deb) ...
    Unpacking replacement php5-mcrypt ...
    Preparing to replace php5-imap 5.3.3-7+squeeze14 (using .../php5-imap_5.3.18-1~dotdeb.0_amd64.deb) ...
    Unpacking replacement php5-imap ...
    Preparing to replace php5-gd 5.3.3-7+squeeze14 (using .../php5-gd_5.3.18-1~dotdeb.0_amd64.deb) ...
    Unpacking replacement php5-gd ...
    Preparing to replace php5-common 5.3.3-7+squeeze14 (using .../php5-common_5.3.18-1~dotdeb.0_amd64.deb) ...
    Unpacking replacement php5-common ...
    Selecting previously deselected package php5-fpm.
    Unpacking php5-fpm (from .../php5-fpm_5.3.18-1~dotdeb.0_amd64.deb) ...
    Processing triggers for man-db ...
    Setting up php5-common (5.3.18-1~dotdeb.0) ...
    Installing new version of config file /etc/cron.d/php5 ...
    Setting up php5-cli (5.3.18-1~dotdeb.0) ...
    Replacing config file /etc/php5/cli/php.ini with new version
    Setting up php5-cgi (5.3.18-1~dotdeb.0) ...
    Replacing config file /etc/php5/cgi/php.ini with new version
    Setting up php5-fpm (5.3.18-1~dotdeb.0) ...
    insserv: warning: script 'K01jailkit' missing LSB tags and overrides
    insserv: warning: script 'jailkit' missing LSB tags and overrides
    
    Creating config file /etc/php5/fpm/php.ini with new version
    update-alternatives: using /usr/sbin/php5-fpm to provide /usr/sbin/php-fpm (php-fpm) in auto mode.
    update-rc.d: using dependency based boot sequencing
    insserv: warning: script 'K01jailkit' missing LSB tags and overrides
    insserv: warning: script 'jailkit' missing LSB tags and overrides
    Doing a soft restart
    Setting up php5-mysql (5.3.18-1~dotdeb.0) ...
    Setting up php5-mcrypt (5.3.18-1~dotdeb.0) ...
    Setting up php5-imap (5.3.18-1~dotdeb.0) ...
    Setting up php5-gd (5.3.18-1~dotdeb.0) ...
    
    

    does it ok to have all php53 from dotdeb?
     
  3. falko

    falko Super Moderator ISPConfig Developer

    I think you have no other choice on Debian Squeeze. Personally, I'd use Debian Wheezy if you want to install nginx and PHP-FPM because no external repos are needed.
     
  4. maumar

    maumar New Member HowtoForge Supporter

    It would be very well to go on with wheezy, but...then..as far as u 'now, there is some issue with multiserver?
    I mean:
    I have many webserver squeeze+apache and what I need is a specialized server tight to wp, with nginx+php-fpm and other amenities.
    Can be wheezy joined to a squeeze multiserver infrastructure?
     
  5. maumar

    maumar New Member HowtoForge Supporter

    I am using Debian wheezy, now, with nginx+php-fpm.
    I have no problem to configure and running wp on it, but i not able to get working permalinks; i have configured like here:

    http://http://www.howtoforge.com/forums/showthread.php?t=57477&highlight=permalink

    but it does not work.

    this is my virtual host conf (takne by falko suggestions here and there)
    Code:
    
    server {
            listen *:80;
    
    
            server_name sitotest8.testdomain.it www.sitotest8.testdomain.it;
    
            root   /var/www/sitotest8.testdomain.it/web;
    
    
    
            location / {
                    try_files $uri $uri/ /index.php?$args;
           }
    
           # Add trailing slash to */wp-admin requests.
           rewrite /wp-admin$ $scheme://$host$uri/ permanent;
    
           location ~*  \.(jpg|jpeg|png|gif|css|js|ico)$ {
                    expires max;
                    log_not_found off;
           }
    
    
           include /var/www/sitotest8.testdomain.it/web/nginx.conf;
    
           location ~ /nginx.conf {
                            deny all;
                            access_log off;
                            log_not_found off;
           }
    
    
    
    
            index index.html index.htm index.php index.cgi index.pl index.xhtml;
    
    
    
            error_page 400 /error/400.html;
            error_page 401 /error/401.html;
            error_page 403 /error/403.html;
            error_page 404 /error/404.html;
            error_page 405 /error/405.html;
            error_page 500 /error/500.html;
            error_page 502 /error/502.html;
            error_page 503 /error/503.html;
            recursive_error_pages on;
            location = /error/400.html {
                internal;
            }
            location = /error/401.html {
                internal;
            }
            location = /error/403.html {
                internal;
            }
            location = /error/404.html {
                internal;
            }
            location = /error/405.html {
                internal;
            }
            location = /error/500.html {
                internal;
            }
            location = /error/502.html {
                internal;
            }
            location = /error/503.html {
                internal;
            }
    
            error_log /var/log/ispconfig/httpd/sitotest8.testdomain.it/error.log;
            access_log /var/log/ispconfig/httpd/sitotest8.testdomain.it/access.log combined;
    
            ## Disable .htaccess and other hidden files
            location ~ /\. {
                deny all;
                access_log off;
                log_not_found off;
            }
    
            location = /favicon.ico {
                log_not_found off;
                access_log off;
            }
    
            location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
            }
    
            location /stats {
                index index.html index.php;
                auth_basic "Members Only";
                auth_basic_user_file /var/www/clients/client4/web984/.htpasswd_stats;
            }
    
            location ^~ /awstats-icon {
                alias /usr/share/awstats/icon;
            }
    
            location ~ \.php$ {
                try_files $uri =404;
                include /etc/nginx/fastcgi_params;
                fastcgi_pass 127.0.0.1:9993;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;
            }
    
    
    
    }
    
    
    
    
    Someone there is able to get wokring wp with permalinks on wheezy+nginx+php-fpm (php 5.4)?


    Important:
    the same configuration with debian squeezy (php 5.3) and dotdeb nginx, does work fine.


    Edit:
    the issue is related to w3tc and permalinks => /%postname%.html
    w2tc => 0.9.2.4

    w/o w3tc permalinks /%postname%.html work fine

    when i enable minify and page cache, permalinks /%postname%.html stop working with 404 (the permalink is not get rewritten)


    Edit:

    http://wordpress.org/support/topic/...alink-structure-postnamehtml-does-not-include

    seems fix my issue :)
    Code:
    Add "/" at end of your permalink like this
    /%postname%.html/
    
     
    Last edited: Nov 1, 2012

Share This Page