Configuring an existing site to work with ISPConfig

Discussion in 'Installation/Configuration' started by Mitzy, Mar 23, 2012.

  1. Mitzy

    Mitzy New Member

    Hello again,

    I thought I would ask for advice before I started on my plans.

    I already had my server up and running Ubuntu 10.04 nginx php5-fpm before I come across ISPConfig, I have one active/production site but had nearly a dozen spare domains to play with.

    I got ISPC set up just fine and began removing my preconfigured vhosts and associated web accessible folders. Once I had removed them I would readd the sites via ISPC. All has been well so far.

    Now my production site is a bit more complicated.

    The url is but I've got a domain alais which has several subdomains which serve up various different types of content. I also have a few extra snipets of code which aren't present in the normal ISPC php directives. Also my public accessible folder location is different than the folder location that ISPC uses.

    My production site is located in /srv/www/ whereas ISPC locates them at /var/www/ is it easy enough to move all the files?

    The default ISPC PHP directive is
    location ~ \.php$ {
                [B]try_files $uri =404;[/B]
                include /etc/nginx/fastcgi_params;
                fastcgi_pass unix:/var/lib/php5-fpm/web8.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME       $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_script_name;
                fastcgi_intercept_errors on;
    My PHP directive has the following small but very important difference.
    location ~ \.php$ {
    		[B]try_files $uri [COLOR="Red"]/index.php[/COLOR] =404;[/B]
    		fastcgi_pass   unix:/tmp/phpfpm.sock;
    		fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    		include        fastcgi_params;
    I have read that manually editing the vhosts will result in the edits not sticking, how can I make my edit stick?

    Sorry for the wall of text, I'm all ears at this stage as I just want to get this one last move right before I make the jump.

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Move all files to the folders from ISPConfig and then create a symlink from /srv/www to /var/www.

    The templates for the nginx configuration files are in /usr/local/ispconfig/server/conf, copy the file that you like to change to the conf-custom folder and then modify it there so that it fits your needs. The templates get applied to a site when you add or modify settings for that site in ispconfig.
  3. Mitzy

    Mitzy New Member


    NVM Sorted, thanks you.
    Last edited: Mar 24, 2012

Share This Page