No internet connection
  1. Home
  2. Support

htpasswd in htaccess on centos not allowing static download

By @fillinthe2019-11-27 12:19:14.213Z

I tried making a static ZIP archive from a centos 7 box where the subdomain had an htpasswd assigned to the doamin. It would not work at all. This was the error received:
[Tue Nov 26 16:35:38.075972 2019] [proxy_fcgi:error] [pid 1174:tid 139931284358912] [client 24.27.113.4:41086] AH01071: Got error 'PHP message: PHP Warning: rename(/var/www/vhosts/####.com/dev.####.com/wp-content/uploads/wp-static-html-output-1574807050.tmp,/var/www/vhosts/####.com/dev.####.com/wp-content/uploads/wp-static-html-output-1574807050.zip): No such file or directory in /var/www/vhosts/####.com/dev.####.com/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/ArchiveProcessor.php on line 2', referer: https://dev.####.com/wp-admin/admin.php?page=wp2static

When I disable htpasswd and run the export it works fine. How can I avoid this error in the future? It seems as though the script with make a directory that does not end in .tmp and is empty if htpasswd is enabled.

  • 3 replies
  1. Leon Stafford @leonstafford2019-11-27 12:51:02.505Z

    It could be the case that the Basic Auth settings aren't set in the plugin's options, resulting in an empty zip?

    If the static site directory being created as expected (same name as zip archive, minus extension)?

    1. F@fillinthe2019-11-27 12:53:28.098Z

      That is it... It is a case of RTFM :/ Thank you!

      1. Leon Stafford @leonstafford2019-11-27 13:02:44.730Z

        w00t! So happy when it's an easy one to solve :D