#VPS
9 messages · Page 1 of 1 (latest)
does
listen 80;
listen [::]:80;
server_name example.com;
root /srv/example.com/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ ^/index\.php(/|$) {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_hide_header X-Powered-By;
}
location ~ /\.(?!well-known).* {
deny all;
}
}```
need to go in ur .conf file in the VPS (Sorry never used a vps before) (inde etc/apache2/sites-enabled
Well no, that's an nginx config, not apache
ah yea i use apache, but nginx is better? for the database + laravel
or
^
Check what the pros and cons are for both of them, neither really is better.
then why not have apache for know, do you know why it isnt working then?
Probably because you haven't configured a document_root in your apache config?
probably not as I am new to VPS's and dont know what I need to change and what not