LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   <Limit LOGIN> error on Apache Ubuntu 16.04 (https://www.linuxquestions.org/questions/linux-server-73/limit-login-error-on-apache-ubuntu-16-04-a-4175596698/)

Razvancs 01-03-2017 08:56 AM

<Limit LOGIN> error on Apache Ubuntu 16.04
 
If i put this command in Ubuntu 14.04 Apache conf is working fine
<Limit LOGIN>

# single ip address example
Allow from 2.232.xxx.xxx

DenyAll

</Limit>

But on my Ubuntu 16.04 is not working and i get this error...
Failed to apply changes :
AH00526: Syntax error on line 221 of /etc/apache2/apache2.conf:
<Limit not allowed here
Action 'configtest' failed.
The Apache error log may have more information.

Any ideas? I want to enable access on webmin only from my ip

bathory 01-03-2017 11:50 AM

Quote:

Any ideas? I want to enable access on webmin only from my ip
In apache 2.4 the <Limit ..>...</Limit> clause is allowed only in directory or .htaccess context. And you need to use "Deny from All"
Code:

<Directory "/path/to/webmin">
<Limit LOGIN>

# single ip address example
Allow from 2.232.xxx.xxx

Deny from All

</Limit>
...
</Directory>

Regards

Razvancs 01-04-2017 03:13 AM

Thanks, solved from Webmin Access Pannel


All times are GMT -5. The time now is 08:34 PM.