• Resolved ayntk

    (@ayntk)


    Solid Security always tries to update the Apache file:

    id               => 38711
    module           => core
    type             => critical-issue
    code             => itsec-config-file-update-empty::apache
    timestamp        => 2023-12-09 13:13:03
    init_timestamp   => 2023-12-09 13:13:01
    remote_ip        => 127.0.0.1
    user_id          => [empty string]
    url              => wp-cron
    memory_current   => 34913264
    memory_peak      => 37772128
    data             => Object WP_Error
        errors       => Array
            itsec-config-file-update-empty::apache   => Array
                0   => Empty file encountered when attempting to update <code>.htaccess</code>. Manual configuration for the <code>.htaccess</code> file can be found on the Security > Settings page in the Advanced section.
        error_data   => Array()

    This should never be run on a nginx web server. Every hour I get a critical error in the solid security logs because of this. Please fix this in the next release.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @ayntk, we’re happy to help!

    I see you’re getting the Empty file encountered when attempting to update apache config file.
    error but your server is NGINX.

    Can you try these steps and then rerun another site scan to see if it helps?

    • Go to Security > Settings > Configure > Global Settings and ensure that the?Write to Files?setting is checked. Please also ensure that the NGINX CONF FILE?path is correct. You can re-save the settings to be sure.
    • Make sure that the nginx.conf file is copied to your website’s root and restart your server for the changes to take effect. If you need help to do this, please reach out to your hosting provider for assistance.

    Hope this helps, and let us know how it goes!

    Thread Starter ayntk

    (@ayntk)

    This worked thank you so much

    Plugin Support chandelierrr

    (@shanedelierrr)

    I’m thrilled to hear that!

    If you enjoy Solid Security and appreciate our free support, we’d love to get a kind review from you here.

    Cheers.

    Thread Starter ayntk

    (@ayntk)

    Nerver mind I changed the file path, so that part worked but it is still checking for apache config file: Core Critical Issue Empty file encountered when attempting to update apache config file. 2023-12-14 11:13:03 – 5 Minutes ago. Do I need to manually delete the cron job for this or how can I stop it from doing so (I have already restarted nginx)?

    Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @ayntk, I understand the error persists.

    At this point, you can try disabling the “Write to Files” option is Security > Settings > Global Settings and manually add the plugin rules to your server config files, now that the file path is correct. Once the rules are added and the setting is deactivated, restart your server and clear all cache (preferably in this manner: server cache -> CDN cache (if you use it) -> plugin cache -> browser cache), and then try to rerun a Site Scan to see if the error still shows.

    Looking forward to your response!

    Thread Starter ayntk

    (@ayntk)

    I did not have to manually add the rules to my nginx.conf, they were all there. I disabled writing to files, restarted my server and cleared all caches and it seems to no longer scan for apache but I have not really done anything except disable and clear caches and restart. Is it because I disabled the setting write to files or why?

    Plugin Support chandelierrr

    (@shanedelierrr)

    @ayntk, yes, disabling that setting helped. 

    This error with the NGINX server is not something we often come across and it’s a bit hard to pinpoint why the plugin looks for the file. Here’s a related thread where our users mentioned possible causes. 

    I’m going to mark this post resolved. Please feel free to open a new support topic if you need assistance, and we’d be happy to assist.

    Have a great day!

    Thread Starter ayntk

    (@ayntk)

    Maybe it is related to the nginx version my panel is using, it is using a custom nginx version, could that be the reason?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Do not attempt to update Apache files on nginx web servers.’ is closed to new replies.