Probleme server linux
Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com
-
- Membru, skill +1
- Posts: 326
- Joined: 28 Mar 2008, 01:12
- Detinator Steam: Da
- CS Status: mai putin cu cs-ul in ultimul timp
- Detinator server CS: Cs.Samara.Ro
- Location: Bucuresti
- Has thanked: 8 times
Salut! Am o mare problema vreau un sv_downloadurl care sa downloadeze resursele repede,nu am server cumparat il am la mine pe un pc pe linux,si as vrea sa-l tin mult si bine dar se downloadeaza resursele cam greu asta e ceea mai mare problema pe care o intampin in acest moment. Ma poate ajuta cineva va rog frumos dar la sigur,ca am incercat cu xampp nu merge,am incercat pe un o gazduire din asta free nu merge,am cautat si nici una nu merge,eu am nevoie sa imi ia toate resursele nu doar ce vrea el.Astept sa imi ziceti.
- faKe91
- Fost moderator
- Posts: 1064
- Joined: 07 Oct 2014, 18:49
- Detinator Steam: Da
- CS Status: I <3 Heavy Metal
- SteamID: dogseatmypancreas
- Reputatie: Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni) - Fond eXtream: 0
- Location: Republica Moldova, Chișinău
- Has thanked: 9 times
- Been thanked: 12 times
Instalam nginx
Trecem in directoria nginx
Stergem sablonul, configuram totul in config-ul principal, pentru ca totul sa fie la indemana
Deschidem nginx.conf
Si il aducem sub asa o forma
Cream un folder cu numele www
Iar acum ceva mai interesant. Noi doar nu dorim sa incarcam manual fisierele in /var/www. De aceea vom crea un symlink din directorul cstrike al serverului in directorul /var/www/
De exemplu
Daca avem mai multe servere, facem in felul urmator
Restartam nginx
Acum fisierele se pot descarca folosind link-ul
Unde fastdownload reprezinta NUME_LINK
Adaugam in server.cfg
Code: Select all
apt-get update
apt-get install nginx
Code: Select all
cd /etc/nginx
Code: Select all
rm -f sites-available/default
Code: Select all
nano nginx.conf
Code: Select all
user root;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
http {
include /etc/nginx/mime.types;
access_log /var/log/nginx/access.log;
sendfile on;
tcp_nopush on;
keepalive_timeout 15;
tcp_nodelay on;
directio 5m;
expires max;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
server {
#listen 80;
location / {
root /var/www/;
index index.html index.htm;
set $limit_rate 3m; #limitam viteza de download pana la 3 mb
}
location ~ /(.*)/.*\.cfg { # interzicem downloadarea fisierelor cfg
deny all;
}
location ~ /(.*)/addons/ { # interzicem accesul la addons
deny all;
}
location ~ /(.*)/logs/ { # interzicem accesul la log-uri
deny all;
}
}
}
Code: Select all
mkdir /var/www
Code: Select all
ln -s /calea/spre/cstrike /var/www/NUME_LINK
Code: Select all
ln -s /home/hlds/cstrike /var/www/fastdownload
Code: Select all
ln -s /home/hlds_zombie/cstrike /var/www/zm
ln -s /home/hlds_pub/cstrike /var/www/pub
Code: Select all
/etc/init.d/nginx restart
Code: Select all
http://IP/fastdownload/maps/de_dust2.bsp
Adaugam in server.cfg
Code: Select all
sv_downloadurl "http://IP/fastdownload/"
sv_allowdownload 1