Closed micoso closed 2 years ago
Can you share the contents of your subdomain config file located at /etc/nginx/sites-available/hes
?
Also, please include the output of running the command nginx -t
on your server. (As noted in the Subdomain notes, this command will tell you if their are any errors in your configuration file.)
Hi @micoso -
Looking at the following output...
root@hes:/var/www# /etc/nginx/sites-available/hes
bash: /etc/nginx/sites-available/hes: Permission denied
...it appears you copy/pasted the path /etc/nginx/sites-available/hes
and tried to run it as a command. This is not a command, which is why you're getting the error Permission denied
.
Instead, try prefixing the path with the command code
so it will open the file in VSCode:
code /etc/nginx/sites-available/hes
Once you see the file in VSCode you can copy its contents and share it in your reply to this thread.
Now that I see this output, and my e2practice.hesgradwork.me is the only page I can see Do I need to create the same thing for the P1 folder to create e2p1.hesgradwork.me ?
server {
listen 80;
server_name e2practice.hesgradwork.me;
root /var/www/e2/practice/;
index index.php index.html;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
}
Yup, you got it 👍 you need one block of configs for every subdomain you configure.
Eureka! I've got it working now.
Thank you for the guidance.
Excellent, glad to hear it. : )
I'm missing something and I can't figure it out. I have gone over the setup for subdomains several times.
http://e2practice.hesgradwork.me/ This works and you can see the page I have there.
http://e2practice.hesgradwork.me/bank.php My piggy bank page works.
http://e2p1.hesgradwork.me/ My p1 page only shows the blue LEMP page. I don't know where the error occurs or where it is.
root@hes:/var/www# /etc/nginx/sites-available/hes bash: /etc/nginx/sites-available/hes: Permission denied
root@hes:/var/www# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
from SBuck Can you create a new thread with this issue? Each separate issue should have its own thread.
Also, in that thread can you include the contents of your subdomain config file located at /etc/nginx/sites-available/hes?
Also, please include the output of running the command nginx -t on your server. As noted in the Subdomain notes, this command will tell you if their are any errors in your configuration file.