Nginx vhost lost - how to rebuild via ssh?

Discussion in 'Installation/Configuration' started by Neptun, Feb 27, 2024.

  1. Neptun

    Neptun Member

    Dear all,
    I searched now for hours, but I cannot find anything.
    I had an Nginx error after an regular update and lost with the rebuild all the ispconfig vhost of my websites as well also of the ispconfig control panel.
    Sites available and enabled is missing the ispconfig vhost files.
    Nginx itself is working and reachable via the iP.
    I have debian 12 and latest ispconfig release.
    How is it possible to rebuild all this Nginx ispconfig vhost again manually via ssh?
    I have already tried to to ispconfig updated with force to reconfigure everything, everything run without any errors, but I got not the missing Nginx vhost files back.
    How is it possible?
    Thanks in advance
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can only rebuild them via ISPConfig GUI > Tools resync.

    Code:
    touch /etc/nginx/sites-available/ispconfig.vhost
    touch /etc/nginx/sites-available/apps.vhost
    touch /etc/nginx/sites-available/acme.vhost
    cd /etc/nginx/sites-enabled
    ln -s /etc/nginx/sites-available/ispconfig.vhost 000-ispconfig.vhost
    ln -s /etc/nginx/sites-available/apps.vhost 000-apps.vhost
    ln -s /etc/nginx/sites-available/acme.vhost 999-acme.vhost
    ispconfig_update.sh --force
    
    Then login to ISPConfig, go to Tools > resync, and let ISPConfig resync the websites.
     
    ahrasis and Neptun like this.
  3. Neptun

    Neptun Member

    @till thank you so much!!!!
    Everything is back again and working as before without any issues anymore.
     
    till likes this.
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Rebuild of what? How?
    I ask so I can avoid doing that if I face similar situation.
     
  5. michelangelo

    michelangelo Active Member

    Look at the starter post and till's answer for the context.
    Especially till's answer contains the answer to your question.
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I'm asking about your post #1, what rebuild did you do that broke the system?
     
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Most probably he purged nginx to fix its errors which also deleted all nginx folders including the one for site's vhost files. This is a common mistake, happened to me in most of my early days.
     
    Taleman and michelangelo like this.
  8. Neptun

    Neptun Member

    Yes correct @ahrasis, after an uncompleted wrong running update of nginx were different errors, which were not possible anymore to fix in another way.
    Normally I don't forget something like that & I thought I have a backup ..... - happens definitely only once
     

Share This Page