the perfect server . how can i change apache for nginx?

Discussion in 'HOWTO-Related Questions' started by mart28, Apr 8, 2015.

  1. mart28

    mart28 New Member

    hi
    I have a perfect apache server following the apache tutorial , running several websites .
    I want a perfect server wich ngnix
    https://www.howtoforge.com/perfect-server-debian-wheezy-nginx-bind-dovecot-ispconfig-3-p4
    Could make only steps 12 ?
    12 Install Nginx, PHP5 (PHP-FPM), And Fcgiwrap
    and change apache nginx .
    I Would have to make these changes also 12.2 ?.
    I'll have problems ?.

    Ispconfig automatically configured, enabled sites ?

    ┬┐is better make a new install ?




    thank you very much
    a greeting

    12.2 Install phpMyAdmin

    o do this, paste the following into the nginx Directives field on the Options tab of the web site in ISPConfig:
    location /phpmyadmin {
    root /usr/share/;
    index index.php index.html index.htm;
    location ~ ^/phpmyadmin/(.+\.php)$ {
    try_files $uri =404;
    root /usr/share/;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $request_filename;
    include /etc/nginx/fastcgi_params;
    fastcgi_param PATH_INFO $fastcgi_script_name;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 256 4k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;
    }
    location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
    root /usr/share/;
    }
    }
    location /phpMyAdmin {
    rewrite ^/* /phpmyadmin last;
    }




    location /phpmyadmin {
    root /usr/share/;
    index index.php index.html index.htm;
    location ~ ^/phpmyadmin/(.+\.php)$ {
    try_files $uri =404;
    root /usr/share/;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_param HTTPS on; # <-- add this line
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $request_filename;
    include /etc/nginx/fastcgi_params;
    fastcgi_param PATH_INFO $fastcgi_script_name;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 256 4k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;
    }
    location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
    root /usr/share/;
    }
    }
    location /phpMyAdmin {
    rewrite ^/* /phpmyadmin last;
    }
     
    shandavis likes this.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Better do a new install. The configuration is quite different and there is no clean way to change the webserver without reinstall.
     
  3. mart28

    mart28 New Member

    Ispconfig automatically configured, enabled sites ?

    I have problems with settings enabled sites outside the home directory of nginx


    I did a test on local server
    and I created a test page

    a file with <? php phpinfo (); ? >

    it works
    In the original directory nginx
    root /usr/share/nginx/www

    I install wordpress in the same directory works fine

    this is the settings enabled sites





    [​IMG]


    I change the directory of the web
    root /var/www/html

    no runs a new test page

    is not possible to make a new installation of wordpress

    [​IMG] [​IMG]



    Can you help me ?

    thank you very much
    a greeting
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Why do you have sites outside of ispconfig? This will just make your setup unusable.

    Remove the site that you added outside of ispconfig, then login to ispconfig and create the site there and then upload its contents to the correct web directory of that site.
     
  5. mart28

    mart28 New Member

    thanks
     
  6. fatorXb2

    fatorXb2 New Member

    Nice one. I was wondering about this too.
     
    shandavis likes this.
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    fatorXb2 likes this.

Share This Page