Jump to content
Hostul a fost schimbat. Daca vedeti serverul offline readaugati rpg.b-zone.ro sau 141.95.124.78:7777 in clientul de sa-mp ×

Linux • .htaccess


Pymbor
 Share

Recommended Posts

Pasul 1

 

Adaugam in httpd.conf urmatoarele linii cod daca nu exista :

 

Options Indexes Includes FollowSymLinks MultiViews

AllowOverride AuthConfig
Order allow,deny
Allow from all

# /etc/init.d/apache2 restart

Pasul 2

 

Cream user si parola pentru .htaccess

# mkdir -p /home/secure
# htpasswd -c /home/secure/passwords joe
# chown www-data:www-data /home/secure/passwords
# chmod 0660 /home/secure/passwords
# chown joe /home/secure/passwords
# chmod 0660 /home/secure/passwords

Pasul 3

 

Cream fisierul .htaccess in directorul home/secure/ si inseram urmatoarele linii cod.

.htaccess
AuthType Basic
AuthName "Zona Restrictionata"
AuthUserFile /home/secure/passwords
Require user joe
# /etc/init.d/apache2 restart

Pasul 4

 

Verificam in browser serviciul .htaccess

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.