Apache2 .htaccess features when using ISPC with nginx

Discussion in 'General' started by Undo, Nov 3, 2012.

  1. Undo

    Undo New Member

    [Solved] Apache2 .htaccess features when using ISPC with nginx

    Hi everyone,

    I have seen that ISPC can now be installed in "nginx mode", that is to say, using nginx instead of Apache2 as the webserver.

    I am wondering, though: Is ISPC providing any way, using the ISPC user interface, to emulate the use of .htaccess features?

    I am especially thinking of redirection / mod_rewrite. There are some features in the ISPC user interface when using apache2 that use specific apache stuff for redirecting directories to others, etc. ... Have those features been "ported" to the nginx version of ISPC?

    Thanks in advance,
    Last edited: Nov 4, 2012
  2. falko

    falko Super Moderator ISPConfig Developer

    No. You must translate the .htaccess Apache directives to nginx and add them to the nginx Directives field on the Options of the website in ISPConfig.
  3. Undo

    Undo New Member


    Thanks for answering.

    Ok, but 3 more additional questions :

    1. What about the "Subdomain for website" and "Alias for website" features (in the left menu, in the "Sites" tab)? They were basically using special apache2's directives.

    2. What about the tab "Redirect" when editing a website (where we had the choice between the redirect flags, etc. ...)

    3. If we can enter directives that will be put into Nginx configuration, how does ISPC protects from users that put incorrect directives? I have been using nginx since long now, and if you have, for instance, a syntax error in one of the vhosts (that are, then, included in the global config file) and you restart nginx, then it will just not start. If the user can enter any string as a nginx directive, then at the next nginx restart, the complete web server is down!
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    On nginx they use nginx directives automatically, so nothing you have to care about. ispconfig handles this automatically.

    This function exists for nginx too, the available options are just different to match the functions in nginx. Install a nginx server any try it out.

    Neither the nginx nor apache directives field are available for userslike you write above, they are only available to the Administrator of the server and a admin should know what he is doing.
  5. Undo

    Undo New Member

    OK, so that means that the features they had access to using .htaccess files are now only available to the admin and not to the user, am I right?
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Nginx has no feature like .htaccess for users to set directives themself as the nginx developers found it too slow to search for .htaccess like files in the filesystem for every request. Nginx is a fast but special apache replacements for high speed websites, like with most software, speed improvements go hand in hand with reducing functions. Nginx is not a replacement for apache in enuser scenarios for most internet service providers as it requires more knowledge and the .htaccess filedelivered with most cms systems can not be used,so the system administrator has to do these changes for its clients.
  7. Undo

    Undo New Member

    I know all that stuff. What I wanted to know is if ISPC is bringing ways to work around that fact or not - from a user point of view. It is not, that's totally fine like that, just need to be clear about it. Thanks.

Share This Page