Unable to find basic requirements

dfoy
Member | 1
+
0
-

I am trying to set up a Nette project on a new, bare installation of Ubuntu 18.04 on a server at Vultr.com. I don't want to install it locally on my Windows laptop.

Obviously I need to set up PHP. Even though you never state it in so many words, it becomes clear that I also need to install a web server. But what web server will, or will not, work for Nette?

One of the how-to-install pages states: “You will need PHP version 7.1.0 or higher to run Nette Framework 3.0. Also, your server will have to comply with required configuration of PHP.”

But you give me no way to know what the required configuration is. You tell me to install the sandbox and it will report errors, but the sandbox won't run unless PHP and a web server are correctly installed.

Could someone please add more information to the page:
https://doc.nette.org/…ting-started
and/or to the page:
https://doc.nette.org/…requirements

The information that would be helpful to me and people like me is:
how to install Apache and/or Nginx and/or other web server, and which configuration files must be edited (and what the correct configuration is). Must mod-rewrite be enabled? Should I use .httaccess, or one of the Apache configuration files? And, if so, how? And so on. Also, please don't just assume I know which file to edit: state clearly that I must edit, for example, /etc/Apache2/somefile.conf or whatever it is, and exactly what the edit should be.

Also, please state clearly where the document root should be in order to use the quick-start script. Right now it appears that the Apache document root (/var/www) is required, but it would be helpful if you stated that specifically, for example:
“This project is meant to be installed in the Apache document root, /var/www. Using your terminal, go to /var/www and enter the following command: composer create-project nette/web-project nette-blog. When the installation has finished, you will find your project files in /var/www/[project-name]/[blog-name].”

It is my plan to install Nette so it runs as the default program from http://www/foy.icu. I have already set up DNS correctly so that foy.icu works, and in earlier tests I have proven that Apache will serve an index page correctly from that address (those test configurations are gone now and foy.icu is just a bare Ubuntu installation).
My question: is the Nette project required to be in /var/www or in /var/www/html? Should I edit the Apache default host file? Should I create an Apache virtual host and use /var/www/foy.icu/public_html?

It would be most helpful for people like me to be shown how to install the correct PHP and the necessary dependencies, in the form of
“Open your terminal, use SSH to connect to your server. Use this command to install PHP: "apt install PHPwhatever, php-mysqlwhatever, php-libsomething” etc etc. If the PHP.ini file needs to be edited, please tell me which configuration directives I need to edit.

Then, it would also be helpful if you could give some advice about running the quickstart from a web browser and a remote server. Right now you assume I am using a local installation, and you say

“At this moment, the welcome page of the Web Project should be running. Try it by opening your browser and going to the following URL:
http://localhost/nette-blog/www/
and you should see the Nette Framework welcome page:”

It would be helpful to include, as an alternative, an example URL for a remote server: “http://[your-server-IP]/index.php” or whatever is correct, along with some trouble-shooting advice: “if the welcome page does not appear, go back and be sure Apache and PHP are configured correctly, and that your file strucure looks like this:
[an ASCII diagram of the correct file structure would be helpful]”

I realize this must seem very elementary to you, and you probably don't believe it is necessary, but I assure you, many of the people trying to learn and possibly use Nette come from different backgrounds than you do, and much of what you take for granted is not obvious at all to people like me. I am not a beginner – I have set up Apache and PHP virtual hosts many times, and Nginx a few times, as well as MySQL and SQLite, and I have worked with non-standard configurations. However, I am not an expert. I find myself stopped cold when simple things are not explained, and I then spend too much time on Google trying to locate information on, for example, .htaccess, or where php.ini is located, before I can continue. It is very frustrating and too much time gets wasted.

I hope you find my suggestions helpful. Nette seems promising and I would like to make use of it.

David Foy

+
+5
-

dfoy wrote:

I am trying to set up a Nette project on a new, bare installation of Ubuntu 18.04 on a server at Vultr.com. I don't want to install it locally on my Windows laptop.

I would think that the setup of hosting environments, is beyond the scope of nette.
The requirements are laid out in https://doc.nette.org/…requirements

The nette documentation assumes a working web server.

If you have any specific questions regarding set up of a server, I am happy to answer questions where I can.

K

Toanir
Member | 51
+
+3
-

Hi David,

I'm sorry about your struggles with setting up your environments. It seems like you have troubles with configuring your web server which, as you correctly stated, is considered to be a prerequisite of running an PHP (Nette) application.

The reason there aren't as verbose guides here as you described (or at least I don't know about them) is that all of those configuration depend only on the developer and what they expect of their application. The Nette application should be able to run basically anywhere, should the requirements which you and Kevin linked be fulfilled. If there was an exact guide for that, it would emancipate the fun and freedom of choice and I believe you should be able to find better suited guides at the respective application components.

It is usually recommended to start with Apache which is easy to start with since it gives you a default space and also allows you to configure additional spaces.

I prefer to keep my local projects each in their own folder and set virtual hosts for each of them, you can read about virtual host configuration on Apache documentation and about modifying local hosts at this howtogeek tutorial