Results 1 to 10 of 10

Thread: allowmethods + AH01623: client method denied by server configuration: 'OPTIONS'

  1. #1
    Join Date
    Dec 2008
    Posts
    507

    allowmethods + AH01623: client method denied by server configuration: 'OPTIONS'

    Hi

    I just move a domain from http to https.
    And I've an error in logs.

    [Fri May 04 00:28:16.965382 2018] [allowmethods:error] [pid 28452:tid 140520667776768] [client 93.30.137.33:53778] AH01623: client method denied by server configuration: 'OPTIONS' to /home/xxxx/domains/xxxx.com/private_html/smileytchat/minichatAffiche.php

    It's an ajax request...
    There was no problem with http.

    Thanks for your help if you have an idea for me.


    PHP 5.6.36 (site not yet ready for PHP 7)

  2. #2
    Join Date
    Aug 2015
    Posts
    277
    show your httpd.conf file here
    Kind regards, Fred

    Alentejo Webdesign
    Webdesign with Passion is what we do
    Web development, Hosting, Speed Optimizing & More......

  3. #3
    Join Date
    Dec 2008
    Posts
    507
    Hi
    thanks for reply, sorry for delay.

    file is :
    Code:
    #
    # This is the main Apache HTTP server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://httpd.apache.org/docs/2.4> for detailed information.
    # In particular, see 
    # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
    # for a discussion of each configuration directive.
    #
    # Do NOT simply read the instructions in here without understanding
    # what they do.  They're here only as hints or reminders.  If you are unsure
    # consult the online docs. You have been warned.  
    
    #
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    #
    # Do not add a slash at the end of the directory path.  If you point
    # ServerRoot at a non-local disk, be sure to specify a local disk on the
    # Mutex directive, if file-based mutexes are used.  If you wish to share the
    # same ServerRoot for multiple httpd daemons, you will need to change at
    # least PidFile.
    #
    ServerRoot "/etc/httpd"
    
    #
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, instead of the default. See also the <VirtualHost>
    # directive.
    #
    # Change this to Listen on specific IP addresses as shown below to 
    # prevent Apache from glomming onto all bound IP addresses.
    #
    #Listen 12.34.56.78:80
    Listen 80
    
    <IfModule unixd_module>
    #
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.  
    #
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # It is usually good practice to create a dedicated user and group for
    # running httpd, as with most system services.
    #
    User apache
    Group apache
    </IfModule>
    
    #LoadModule dummy_module /usr/lib/apache/mod_dummy.so
    Include	/etc/httpd/conf/extra/httpd-phpmodules.conf
    
    #
    # ServerAdmin: Your address, where problems with the server should be
    # e-mailed.  This address appears on some server-generated pages, such
    # as error documents.  e.g. admin@your-domain.com
    #
    ServerAdmin admin@localhost
    DocumentRoot "/var/www/html"
    
    <IfModule dir_module>
        DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi index.pl
    </IfModule>
    
    #
    # The following lines prevent .htaccess and .htpasswd files from being 
    # viewed by Web clients. 
    #
    <Files ".ht*">
        Require all denied
    </Files>
    
    #
    # The following lines prevent .user.ini files from being viewed by Web clients.
    #
    <Files ".user.ini">
        Require all denied
    </Files>
    
    #
    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here.  If you *do* define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    #
    ErrorLog /var/log/httpd/error_log
    
    #
    # LogLevel: Control the number of messages logged to the error_log.
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    #
    LogLevel warn
    
    <IfModule log_config_module>
        #replace %b with %O for more accurate logging
        <IfModule mod_logio.c>
          LogFormat "%a %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
          LogFormat "%a %l %u %t \"%r\" %>s %O" common
          LogFormat "%O %I" bytes
    
          LogFormat "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
        </IfModule>
    
        CustomLog /var/log/httpd/access_log common
    </IfModule>
    
    <IfModule alias_module>
        # Include some DirectAdmin alias
        Include conf/extra/httpd-alias.conf
    </IfModule>
    
    #DefaultType text/plain
    
    <IfModule mime_module>
        TypesConfig conf/mime.types
        AddType application/x-gzip .tgz
        AddEncoding x-compress .Z
        AddEncoding x-gzip .gz .tgz
        AddType application/x-compress .Z
        AddType application/x-gzip .gz .tgz
        AddHandler cgi-script .cgi
        AddHandler type-map var
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
    	AddType video/x-ms-asf .avi
    	AddType video/mpeg .mpg
    	AddType video/mpeg .mpeg
    	AddType video/quicktime .mov
    	AddType video/x-ms-wmv .wmv
    </IfModule>
    
    #
    # MaxRanges: Maximum number of Ranges in a request before
    # returning the entire resource, or one of the special
    # values 'default', 'none' or 'unlimited'.
    # Default setting is to accept 200 Ranges.
    #MaxRanges unlimited
    
    #
    # EnableMMAP and EnableSendfile: On systems that support it, 
    # memory-mapping or the sendfile syscall may be used to deliver
    # files.  This usually improves server performance, but must
    # be turned off when serving from networked-mounted 
    # filesystems or if support for these functions is otherwise
    # broken on your system.
    # Defaults: EnableMMAP On, EnableSendfile Off
    #
    #EnableMMAP off
    #EnableSendfile off
    
    #######################################################################################
    # For user configurations not maintained by DirectAdmin. Empty by default.
    #######################################################################################
    
    Include conf/extra/httpd-includes.conf
    
    #######################################################################################
    # Supplemental configuration
    #######################################################################################
    
    # Options and AllowOverrides
    Include conf/extra/httpd-directories.conf
    
    # Nginx reverse proxy configuration
    Include conf/extra/httpd-nginx.conf
    
    # Server-pool management (MPM specific)
    Include conf/extra/httpd-mpm.conf
    
    # Multi-language error messages
    Include conf/extra/httpd-multilang-errordoc.conf
    
    # Fancy directory listings
    Include conf/extra/httpd-autoindex.conf
    
    # Language settings
    Include conf/extra/httpd-languages.conf
    
    # User home directories
    #Include conf/extra/httpd-userdir.conf
    
    # Real-time info on requests and configuration
    Include conf/extra/httpd-info.conf
    
    # Suphp
    Include conf/extra/httpd-suphp.conf
    
    # Local access to the Apache HTTP Server Manual
    #Include conf/extra/httpd-manual.conf
    
    # Distributed authoring and versioning (WebDAV)
    Include conf/extra/httpd-dav.conf
    
    # Various default settings
    Include conf/extra/httpd-default.conf
    
    # Secure (SSL/TLS) connections
    Include conf/extra/httpd-ssl.conf
    
    # Deflate module settings
    Include conf/extra/httpd-deflate.conf
    
    #######################################################################################
    # Do not change anything in files below, because they are rewritten by DirectAdmin    #
    #######################################################################################
    
    # This is needed for PHP
    Include conf/extra/httpd-php-handlers.conf
    
    # Virtual hosts
    Include conf/extra/httpd-vhosts.conf
    
    # All the DirectAdmin vhosts
    Include conf/extra/directadmin-vhosts.conf
    
    #######################################################################################
    # End of included files that are rewritten by DirectAdmin                             #
    #######################################################################################
    
    <IfModule ssl_module>
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin
    </IfModule>

  4. #4
    Join Date
    May 2008
    Posts
    606
    Are you doing any authentication (.htaccess/.htpasswd)?

  5. #5
    Join Date
    Aug 2015
    Posts
    277
    You can add this into Custom HTTPD Configurations and see if it solve the error.

    Code:
    <Directory /home/xxxx/domains/xxxx.com/private_html/smileytchat> 
    AllowOverride none
    Require all granted
    </Directory>
    Kind regards, Fred

    Alentejo Webdesign
    Webdesign with Passion is what we do
    Web development, Hosting, Speed Optimizing & More......

  6. #6
    Join Date
    Dec 2008
    Posts
    507
    Thanks for your help.

    @wattie : no authentification with htaccess/htpasswd

    @Awd
    Why these instructions ?

    => private_html is not used (symlink to public_html)
    => directory /smileytchat appears in log errors, because it's a chat, actulised every second.

    But the error is on all the website.

    Strangely, only few IPs cause this error. (2 or 3 actually).

  7. #7
    Join Date
    Aug 2015
    Posts
    277
    If the error is only from 2 or 3 ipīs (check the ipīs, where they from? are they legitime visitors, if not, block them) maybe someone is trying to access files in your private_html folder, which isn't used. Then you can ignore these errors.

    If it is in the script, then something is wrong with permissions, that is why I suggested to add the code into the virtualhost
    Kind regards, Fred

    Alentejo Webdesign
    Webdesign with Passion is what we do
    Web development, Hosting, Speed Optimizing & More......

  8. #8
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,709
    You can change http_methods in /usr/local/directadmin/custombuild/options.conf
    And than use /usr/local/directadmin/custombuild/build rewrite_confs

    This should add the required method in the apache (and nginx) allowed ones.

    Hope it helps.

    Best regards
    SeLLeRoNe - Andrea Iannucci
    Head of Managed Service - Senior DevOps Engineer
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  9. #9
    Join Date
    Dec 2008
    Posts
    507
    Hi,
    Thanks to all.

    @sellerone method was the one I use to another server, but impossible to find it again...
    And it was ok.

    => just one question :
    do you know what is the OPTIONS configuration value ?
    I don't understand clearly, why it's used. Not sure it's "valid" request.
    But last one error, comes from google bot (looking url without https)

    I don't have this problem on other servers. Only PUT or DELETE methods. (and classic GET:HEAD:POST)

  10. #10
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,709
    https://developer.mozilla.org/en-US/...ethods/OPTIONS

    I don't know which bit of your application does use OPTIONS, but it is one of the standards methods, for intsance i need this and other for DAV communications.
    SeLLeRoNe - Andrea Iannucci
    Head of Managed Service - Senior DevOps Engineer
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •