All of these steps were taken, no effect at all.
accessing the droplet via http all it does is show the default web page “ssh to configure your lemp installation”
Even when accessing via putty it says “default web root is” /var/www/html even after all the changes.
I’m just trying to deploy my Laravel app to the vps and the setting up part is taking longer than the coding itself.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
@Vanker
The way the repository packages are setup, files in:
are symlinked to:
i.e
The NGINX configuration file located at
/etc/nginx/nginx.conf
then loads the files from:You can confirm this by looking at the bottom of the
http
block for a line that shows:It may also look like:
Changes should reflect regardless of whether you modify the link or the actual file.
…
Changes to the web root that NGINX uses are reflected by modifying
root
in the server block. If it’s current using/var/www/html
, i.e.You’d simply change that line and reload/restart NGINX.
…
That being said, you may find it more beneficial to clean up the server block and remove the clutter so that you’re not sifting through commented lines that have no bearing on your configuration.
The server block you posted would look like the following, once cleaned up:
I removed
try_files $uri /index.php =404;
from thelocation ~ \.php$
block as it really shouldn’t be needed.I also changed
$query_string
to$args
as it’s more commonly used.That said, you may need the
index
line if it’s not defined innginx.conf
, so we can add that back line so:…
That being said, the one-click images are meant to be a starting point. You still need to know how to manage a server, setup the server, etc. Server/System administration, much like coding, isn’t a one-time deal that requires no further setup, configuration, or tweaking/tuning – it’s on-going.
This comment has been deleted
@Vanker
Please post the contents of
/etc/nginx/nginx.conf
and also, check the directory to make sure that the file containing your server block data actually exists at the location you are using.So if
nginx.conf
is set to:Then your server blocks need to be in
/etc/nginx/sites-available
, i.e.etc.