Bilgi Bankası

Sunucuda sanal host (virtual host) nasıl tanımlarım?

Sunucuda sanal host (virtual host) nasıl tanımlarım?

Apache: $ sudo nano /etc/apache2/sites-available/ornek.com.conf oluşturun ve içine: ```apache ServerName ornek.com ServerAlias www.ornek.com DocumentRoot /var/www/ornek.com AllowOverride All Require all granted ErrorLog ${APACHE_LOG_DIR}/ornek_error.log CustomLog ${APACHE_LOG_DIR}/ornek_access.log combined ``` Ardından: ```bash sudo a2ensite ornek.com.conf sudo systemctl reload apache2 ``` Nginx: $ sudo nano /etc/nginx/sites-available/ornek.com oluşturun ve içine: ```nginx server { listen 80; server_name ornek.com www.ornek.com; root /var/www/ornek.com; index index.php index.html index.htm; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.4-fpm.sock; } access_log /var/log/nginx/ornek_access.log; error_log /var/log/nginx/ornek_error.log; } ``` Ardından siteyi etkinleştirin ve yeniden başlatın: ```bash sudo ln -s /etc/nginx/sites-available/ornek.com /etc/nginx/sites-enabled/ sudo systemctl restart nginx ```

Aradığınız Bilgiyi Bulamıyor musunuz?

Bilgi bankasını detaylı olarak incelediniz, fakat ihtiyacınız olan bilgiyi bulamıyorsanız,

Bir Destek Talebi Oluşturun.
Faydalı Buldunuz mu?

1 defa görüntülendi | 0 kişi faydalı buldu

3826704865 +38267054865 +38267054865 Top