.htaccess files are ignored and do not work

Follow

Comments

10 comments

  • Avatar
    Gerasimos Perentidis

    The fix does not work.

    Also the article is vague.

    **** create *.conf file in /etc/httpd/conf.d/ ****

    What is   "  *.conf  "   ???

    What is the correct name for the file ?

  • Avatar
    Vitaly Zhidkov

    @Gerasimos, you can give any name to this file. For example "enablehtaccess.conf"

  • Avatar
    Cihan

    I am getting this error when I want to save the file

    [ Error writing /etc/httpd/conf.d/zz010_psa_httpd.conf: No such file or direct ]

  • Avatar
    Bulat Tsydenov

    @Cihan, you should not touch this file, it is generated by Plesk automatically. In order to regenerate it, you can run `plesk sbin httpdmng --reconfigure-server`

  • Avatar
    Cihan

    @Bulat I didn't touch it, it doesn't exist. I read in this document (in German) to do it like that: https://kb.plesk.com/de/124

    Also it doesn't matter how I name the file, always getting the error No such file or direct

  • Avatar
    Bulat Tsydenov

    @Cihan, it seems you don't have `/etc/httpd/conf.d/` folder. Maybe you are using Ubuntu/Debian? In this case, the path should be /etc/apache2/conf.d/

  • Avatar
    Alexandros Boukouris (Edited )

    Not working in Plesk Onyx.

     

    Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

    ● httpd.service - The Apache HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Tue 2017-05-02 17:26:50 EEST; 23s ago
    Docs: man:httpd(8)
    man:apachectl(8)
    Process: 22295 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
    Process: 22293 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
    Main PID: 22293 (code=exited, status=1/FAILURE)

    May 02 17:26:50 systemd[1]: Starting The Apache HTTP Server...
    May 02 17:26:50 httpd[22293]: AH00526: Syntax error on line 4 of /etc/httpd/conf.d/enablehtaccess.conf:
    May 02 17:26:50 httpd[22293]: You may not use 'Options +All' or 'Options -All'.
    May 02 17:26:50 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
    May 02 17:26:50 kill[22295]: kill: cannot find process ""
    May 02 17:26:50 systemd[1]: httpd.service: control process exited, code=exited status=1
    May 02 17:26:50 systemd[1]: Failed to start The Apache HTTP Server.
    May 02 17:26:50 systemd[1]: Unit httpd.service entered failed state.
    May 02 17:26:50 systemd[1]: httpd.service failed.

     

    Obviously the "Options +All" is not accepted by httpd. Is it newer version and needs something else?

    Thanks!

  • Avatar
    Nikolay Zhmuk

    2Alexandros, It depends on version of Apache. For Apache 2.4 "Options All" should be used. The article has been updated. Thank you for the input.

  • Avatar
    Johnny Ambrosio

    If one would want a specific domain only to have this setting would the syntax just be...

    <Directory "/var/www/vhosts/domain.com">

    would that work?

    Thanks in advance for help...

  • Avatar
    Vitaly Zhidkov

    @Johnny, yes, it should work

Please sign in to leave a comment.