Score:0

Where to find the website folder in ubuntu server?

sb flag

So someone gave me the task to find where is the website code exist on ubuntu server when I look at the the index.html file path it is /var/www/example.com/html

but when I go to /var/www directory I am not able to find example.com folder. Can anyone help In this regard or where to find the website code?

David W avatar
cn flag
Check the server configuration. Is Apache running, or Nginx? `ps aux | grep apache` or `ps aux | grep nginx`... from there go into /etc/nginx or /etc/apache2/conf.d/sites-enabled/ and look at the config files.
adnan ijaz avatar
sb flag
it is nginx and in /etc/nginx/conf.d/default.conf I found the path to be /var/www/example.com/html where (example.com just for reference) but when I go to the /var/www directory I do not find any folder with .com or the specified folder.
Paul avatar
cn flag
Try `sudo nginx -T | grep root`.
us flag
If nginx is a reverse proxy for a backend application, then you need to check that application's configuration. You can search for `proxy_pass` in nginx configuration to check for reverse proxy configuration.
Score:-2
in flag

cd /etc/apache2/sites-available folder and check DocumentRoot on default.conf file . if you are not using default.conf then check other file which is available on /etc/apache2/sites-available folder.

in flag
It has already been established in the comments that apache2 is not even used.
Bibhuti Singh avatar
in flag
ok..I didn't seen the comment. But on nginx you have to follow same procedure.. you need to check any other conf file except default.conf in path /etc/nginx/conf.d/ .
adnan ijaz avatar
sb flag
I have checked all the conf files but the target specified in them does not exists the web is a next.js app and is running with pm2, is it possible that the example.com folder does not exist and the app is running on cache?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.