how to enable ispconfig read a .htaccess files in the site ?

Discussion in 'Installation/Configuration' started by dmsrvlinux, Dec 28, 2020.

  1. dmsrvlinux

    dmsrvlinux New Member

    hallo
    how to Enabled ispconfig read a .htaccess files in the site ?
    i Use PHP-FPM PHP 7.3
    Thanks Advance
    my Ubuntu Linux 16.04.6 LTS
    ISPConfig 3.2.1
     
    Last edited: Dec 28, 2020
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Apache reads those by default; nginx does not use them.
     
  3. dmsrvlinux

    dmsrvlinux New Member

    a use apache , ispconfig default apache or not ?

    a use this in ispconfig
    Apache Directives:
    Code:
    <IfModule mod_headers.c>
    Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
    </IfModule>
    and check via nextcloud directive is accepted....
    my problem not read a file .htaccess
    in the file this
    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteCond %{REQUEST_URI} !
    RewriteRule ^(.*)$ https://www.google.com/$1 [R=301,L]
    </IfModule>
    no work
    i test without <IfModule mod_rewrite.c> and </IfModule>
    no work
     
  4. dmsrvlinux

    dmsrvlinux New Member

    this code work
    Code:
    RewriteEngine On
    RewriteRule ^(.*)$ https://www.google.com/$1 [R=301,L]
    i know not work this code ?
    Code:
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteCond %{REQUEST_URI} !
    RewriteRule ^(.*)$ https://www.google.com/$1 [R=301,L]
     
    Last edited: Dec 28, 2020
  5. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Can the apache user/group (www-data) read those files? (Check all directories in the paths, as well as the files themselves)
     
  6. dmsrvlinux

    dmsrvlinux New Member

    file .htaccess this code i work redirect:
    Code:
    RewriteEngine On
    RewriteRule ^(.*)$ https://www.google.com/$1 [R=301,L]
     
    Last edited: Dec 28, 2020
  7. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Good, you have confirmed the file is being read, so any remaining issues would just be in the apache directives you're using.
     

Share This Page