środa, 21 kwietnia 2021

cPanel: An error occurred while attempting to unsuspend “USER”. The user “USER” is not in a suspended state.

 cPanel: An error occurred while attempting to unsuspend “USER”. The user “USER” is not in a suspended state.

Remove broken tasks from: 

rm /var/cpanel/taskqueue/*.json

and

/usr/local/cpanel/scripts/suspendacct USER

/usr/local/cpanel/scripts/unsuspendacct USER

wtorek, 9 marca 2021

czwartek, 4 lutego 2021

wtorek, 26 stycznia 2021

.htaccess limit access to given resource

RewriteCond %{REQUEST_URI} ^(/file/path/file.php).*$


RewriteCond %{REMOTE_ADDR} !=192.168.1.0/24


RewriteCond %{REMOTE_ADDR} !=192.168.*


RewriteRule ^.*$ / [F]

środa, 20 stycznia 2021

Azure App Service + .well-known 404 error

 - create directory .well-known with dot

- create web.config inside of .well-known with

<?xml version="1.0"?>

<configuration>

  

  <system.web>

    <!-- Make directory public. Allow anonymous users access to everything in this directory. -->

    <authorization>

      <allow users="*"/>

    </authorization>

  </system.web>

  

  <system.webServer>

    <!-- Directory only contains plain text files. -->

    <staticContent>

      <mimeMap fileExtension=".*" mimeType="text/plain" />

    </staticContent>

    

    <!-- Only static files are allowed, so remove everything but the StaticFile handler. This also solves the issue with extensionless files returning a 404 Page Not Found. -->

    <handlers>

      <clear />

      <add name="StaticFile" path="*" verb="*" type="" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" scriptProcessor="" resourceType="Either" requireAccess="Read" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />

    </handlers>

  </system.webServer>

  

</configuration>

Ubuntu force dhcp

 systemctl enable systemd-networkd



cat /etc/systemd/network/20-dhcp.network

[Match]

Name=enp*


[Network]

DHCP=ipv4