Folks, I confess to being as dumb as it gets and in every attempt at trying new programming languages, new applications the biggest problem for people like me is versions and explanations. Here’s an example. On this page https://docs.nextcloud.com/server/19/admin_manual/installation/source_installation.html
It talks about installing php. So I download and extract the zip file to my Ubuntu 16 system and then it is not clear what to do. So I look further and check to see that php is installed. It is not, so I install it from this link https://www.liquidweb.com/kb/install-php-7-2-ubuntu-16-04/
Ok so next the pre-requisites make me wonder if I have all of the modules installed. So I check them one by one (surely a script could help here but I’m not at that level to do so yet). I find some are missing. So I try to install them with the usual apt-get install php2.7-modulename. Sometimes I get a response like “selecting ‘php7.2-common’ instead of 'php7.2-iconv”… So I look for php7.2-common and can’t find anything about it. Ok so I ignore that thinking I will get back to it and maybe the iconv module is resident inside of common.
In my wanderings in trying to figure this out I find “apt-cache search php” and this delight provides me with and output that lists php7.4 modules. Really ? Where did that come from because sure as anything I can’t find them. I purge php7.2 thinking php7.4 is installed and then try php -v which tells me that there is no php installed. Jeez. Sometimes it pays to add all of the details to the destructions for people like me who need handholding. I also looked at installing nextcloud from Ubuntu’s Software Install list. And lo and behold there it is Nextcloud ! So I install it and – can’t find it anywhere … But searching provides a snap install folder. So I go back to the Ubuntu SW installation and select nextcloud and lo and behold “Launch” appears. Why I needed to go back there I don’t know, but I did and thought I had found my solution. But alas no- trying to launch it I get Failed to execute child process “/snap/bin/nextcloud.apache” (No such file or directory). Hmm so in /snap/bin indeed there is no nextcloud.apache file… But those instructions have left me stranded with (a) An inability to add modules that tell me common is available and used, but I cannot find what common does, (b) The Ubuntu Software seems to have installed everything except the nextcloud.apache file which sounds suspiciously like the nextcloud.conf file. So lets take the nextcloud.apache file and put it into /snap/bin/nextcloud.apache file. Alas we get “Failed to execute child process “/snap/bin/nextcloud.apache” (Permission denied)”. But all of the other files in that folder belong to root… OK so let’s forget the Ubuntu SW installed nextcloud and given that the installation instructions from nextcloud tell me to create a nextcloud.conf file lets create that. OK, so it seems I need sudo to edit / create the
/etc/apache2/sites-available/nextcloud.conf file. So I sudiously do so (attempt at humour). The desctructions then say " On Debian, Ubuntu, and their derivatives, Apache installs with a useful configuration so all you have to do is create a
/etc/apache2/sites-available/nextcloud.conf file with these lines in it, replacing the Directory and other filepaths with your own filepaths:"
Here’s where idiots like me get tripped up. Which filepaths are the instructions talking about ? Do you mean the file path for where my zip file was extracted from ? This is where prescription helps a lot for people like myself who are trying to figure this stuff out. OK so i use that folder where I unzipped the file as the directory entered into the nextcloud.conf file , I then enable the new site with a2ensite nextcloud.conf and lo and behold “Enabling site nextcloud.
Could not create /etc/apache2/sites-enabled/nextcloud.conf: Permission denied”
So i use sudo and it tells me that “Enabling site nextcloud.To activate the new configuration, you need to run:
service apache2 reload”
So I do that without elevated permissions and "Site nextcloud already enabled "is the retort. OK I’m thinking… Making some progress finally. I tell apache2 to restart with “sudo service apache2 restart” and it does. OK I think let me look at apache running on my ip address and it does. I dutifully follow the next instruction " For Nextcloud to work correctly, we need the module
mod_rewrite . Enable it by running: “a2enmod rewrite” and it tells me it is enabled.
OK so I enable the other modules of which only headers is not running all the other enablements say the module is running.
Next instructions say
“After restarting Apache you must complete your installation by running either the graphical Installation Wizard, or on the command line with the occ command. To enable this, change the ownership on your Nextcloud directories to your HTTP user:” OK I do that and go to https://docs.nextcloud.com/server/19/admin_manual/installation/installation_wizard.html
I am told to go to localhost/nextcloud but the server’s retort is
You don’t have permission to access this resource.
Apache/2.4.18 (Ubuntu) Server at localhost Port 80"
I look in my users and groups and don’t find www-data as users or groups. I wonder if that is my problem.
My intent in this tome is to ask the folks who write instructions to assume a lot of people are like myself trying to get things working. Obviously any help you can provide in solving this particular problem of permissions related to my specific problem would be very helpful, but more specifically as these instructions are written explain when elevated levels are required, explain what paths are used and be explicit about the details. Tx for listening