Where is the "relative project path files location in the server" on the ubuntu 18.04?

/var/www/html is the location of your virtual host if using localhost Apache/PHP. You will need to research “setting up a virtual host”. Digitalocean has some useful LAMP setup tutorials. Meanwhile for localhost testing in Atom you can install php-server package and preview the content in /var/www/html/ … in Atom in tree-view right click on (say) continue1.php, and run “PHP Server here”. But eventually you will need to progress to setup apache2 using apache commands.

I already have apache2

… so do I. But I still use php-server package to test php in Atom. When I write “setup apache2” I mean setting it up to receive content you have pre-tested in Atom.

How can i setup apache2 like you said?
I installed php-server but when i click

php-server here

it shows me a php file in the browser and writes in the console smth like this

Listening on http://localhost:8000

Document root is /var/www/html

PHP 7.3.10-1+ubuntu18.04.1+deb.sury.org+1 Development Server started at Sat Nov 2 14:53:54 2019

Listening on http://localhost:8000

Document root is /var/www/html

Press Ctrl-C to quit.

[Sat Nov 2 14:54:15 2019] 127.0.0.1:55900 [200]: /phpibfo.php

but when i started atom php-server shows mistakes at the console

PHP Server: http://localhost:8000

Listening on http://localhost:8000

Document root is /var/www/html

[Sat Nov 2 14:58:50 2019] 127.0.0.1:55936 [404]: / - No such file or directory
and that window in browser

Let us retrace steps.

Start by getting apache2 to run without Atom in the loop.

Follow tutorials on setting up LAMP server.

DigitalOcean offers good tutorials for LAMP setup.

Get it to the point that you can run http://localhost
to see your default site at /var/www/html

Now the question is where does Atom and php-server come into play?

Atom offers ability to edit content of your Apache2 site.

You can edit and save (in Atom) any PHP file, use Alt+Tab for example to select your browser window instead of Atom.

Hit Ctrl+F5 to refresh your browser cache and view the refreshed content on the port specified (probably port 80 by default).

Now to cut out some of these testing steps switching in and out of Atom you can (inside Atom) invoke php-server. This is simply a PHP built in development server quite separate from apache.

https://www.php.net/manual/en/features.commandline.webserver.php

I hope that is clearer. A development server and a localhost server. Separate sessions.

I installed apache without Digitalocean, but it works well. You could realize it by the first screeen at the discussion, because you could see projects and my atom, i wouldn’t install plugins for apache without working apache

!

i ubderstand

At the start of discussion i only said that i need to know Where is the

“relative project path files location in the server”

i haven’t know yet where is it?

You already have it in your opening image …

/var/www/html/ … in which you have index.php

But on reflection try running http://localhost/continue1.php in browser since you do not have index.php in your root.

Or http://localhost/phpibfo.php (but why phpibfo and not phpinfo?)

Incidentally php-server will report when files are not found. Also explore your apache logs.

And, lastly. when you see output from php-server, as you wrote earlier, did you actually look at output in browser …

http://localhost:8000 … (however i see that your opening image refers to port 9000 - which port is set in php-server setting “port to bind to” - default is 8000?).

that works
Only

localhost:80

works, because

Apache/2.4.29 (Ubuntu) Server at localhost Port 80
You can see that in the image

That is a plugin for xdebug, may be it must be in the different port

Sorry, but i can’t write link to localhost, because of this

!

One forensic tool I use on occasion to get more visibility of what is going on is zenmap …

gksu zenmap

and scan localhost to view listening ports. You might have to install zenmap first.