I’m a final user. I’m an engineer with some knowledge in programming, wanting to set up my own website (with a little help of friends). My system is ubuntu 14.04 now, (holding down the upgrades because of the well known pain of change).
Trying to set that website I choose Grav, essentially because of the said download-unzip-run talk.
I had try some searches in this category and cannot find what I think I need, this is why I’m here.
A friend had deployed a Grav install for me in a server in the web, a dummy site, I have tools to make remote maintenance of this site, but I want to have a copy of that site in my localhost, edit pages locally and upload complete sets of files to the web. You can tell me if I’m wrong to think that way. Specially if there are a better way of doing that.
I don’t have much daily time to my tries, but I have insisted in it a lot, for a fair amount of time scanning all viable help in Grav-site and the way around. I found the good old stack of problems, solve one appears the next. I have read many pages. I know, the problem is with me not in that helpful friends contributions. Well, I’m searching the next one, in a new place.
I choose the simplest theme I found (quark?).
In this way, I give up with the install in my base system and tried another ubuntu 14.04 in a VM. Problems were bigger. Grav reports that GD, XML, Mbstring and Zip libraries are not installed but they are!! So I returned to the host machine version.
Now I think I’m almost there. The symptom (now, next in the stack) is that when I try to access a test page, one like the 03.mypage, this message comes: “Not Found The requested URL /var/www/html/grav/index.php was not found on this server. Apache/2.4.7 (Ubuntu) Server at localhost Port 80”.
But the file is there!!
luis@Eridano:/var/www/html/grav$ ls -la
total 340
drwsrwsr-x 14 www-data www-data 4096 Jun 14 23:35 .
drwxr-xr-x 11 root root 4096 Jun 7 20:18 …
drwxr-sr-x 2 www-data www-data 4096 Abr 12 11:57 assets
drwxr-sr-x 2 www-data www-data 4096 Abr 12 11:57 backup
drwxr-sr-x 2 www-data www-data 4096 Abr 12 11:57 bin
drwxr-sr-x 5 www-data www-data 4096 Abr 28 21:09 cache
-rw-r–r-- 1 www-data www-data 103127 Abr 12 11:57 CHANGELOG.md
-rw-r–r-- 1 www-data www-data 3216 Abr 12 11:57 CODE_OF_CONDUCT.md
-rw-r–r-- 1 www-data www-data 2290 Abr 12 11:57 composer.json
-rw-r–r-- 1 www-data www-data 127136 Abr 12 11:57 composer.lock
-rw-r–r-- 1 www-data www-data 7081 Abr 12 11:57 CONTRIBUTING.md
-rw-r–r-- 1 www-data www-data 3099 Jun 14 22:49 .htaccess
drwxr-sr-x 2 www-data www-data 4096 Abr 12 11:57 images
-rw-r–r-- 1 www-data www-data 1545 Abr 12 11:57 index.php
-rw-r–r-- 1 www-data www-data 1071 Abr 12 11:57 LICENSE.txt
drwxr-sr-x 2 www-data www-data 4096 Abr 12 11:57 logs
-rw-rw-r-- 1 www-data www-data 173 Mai 9 09:54 permitio.sh
-rw-r–r-- 1 www-data www-data 14973 Abr 12 11:57 README.md
-rw-r–r-- 1 www-data www-data 197 Abr 12 11:57 robots.txt
drwxr-sr-x 10 www-data www-data 4096 Abr 12 11:57 system
drwxrwsr-x 2 luis www-data 4096 Mai 28 11:38 Tentativas
drwxr-sr-x 2 www-data www-data 4096 Abr 12 11:57 tmp
drwxr-sr-x 8 www-data www-data 4096 Abr 12 11:57 user
drwxr-sr-x 22 www-data www-data 4096 Abr 12 11:57 vendor
drwxr-sr-x 2 www-data www-data 4096 Abr 12 11:57 webserver-configs
Of course, the webroot is intentionally: /var/www/html/grav
In the path /var/www/html/ are other localsites, my local mediawiki, a CI, a getsimple and a WP. All worked but were abandoned. The mediawiki is well populated but is intended to remain local forever.
Thanx in advance
Luis
if Grav is reporting those modules as not installed, you should probably try to manually install them and see what apt-get reports. When I installed PHP on my Raspberry Pi those modules were not included.
For the 404 error, have you successfully configured a virtual host for the site in Apache?
Thank you for the answer.
(I abandoned the VBox+Grav try, by now, and returned to the host try.)
Oops, I don’t know that I have to have a virtual host. I have not found this requirement in Grav documentation. If this is required, so I didn’t had any chances.
This concept is new to me, I will learn about. Thanks!
Meanwhile, reviewing my steps and to resume:
My install is in var/www/html/grav , there is (among others) a .htaccess, phpinfo.php and index.php.
As I said, in var/www/html/ I have an abandoned wp and a mediawiki, The two runs OK.
If I address localhost/grav I get to the congratulations page, I had indeed modified the /var/www/html/grav/user/pages/01.home/default.md to ensure I’m in the right folder.
(Remark) I however note that I get to the greetings page with or without the .htacces file present!! How? (None of the linked pages work, neither localhost/grav/index.php)
With .htacess present, permissions to www-data:www-data:
1-Get to my modified greetings page
2-In that page:
2.1 - The link to the /var/www/html/grav/user/pages/03.mypage/default.md reflects the modification in the title I made (so it’s accessed).
2.2 - The link “home” respond, “Typography” and “” don’t. They report: “The requested URL /var/www/html/grav/index.php was not found on this server.” Despite the fact that index.php is there, with permissions.
3-If I try http://localhost/grav/index.php then: “Error 404 Woops. Looks like this page doesn’t exist.”
I’m going to study you suggestion! Thank you very much!
I’m reading, maybe you are correct.
I remarked that in every apache restart it complains:
Restarting web server apache2 AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
[ OK ]
I didn’t bother of it because my WP, wikimedia and even the grav initial page that runs. For me, somehow apache resolves it with “localhost” and I didn’t want to play with something that works and I didn’t need to know!!
Luis
I think all this virtual server support is related to remote servers, I’m trying to rise a local server.
I followed:
There we have to have a directory called something.com but my site sits on:
var/www/html/var. And I think for Grav the directory should be that …/var and cannot change or all Grav docs are wrong.
I made a fake name, mysite.com, creating a mysite.com.conf configuration file, then apache tries to find a directory mysite.com !!!
If I ignore this and force my parameters in conf to:
ServerAdmin webmaster@grav
DocumentRoot /var/www/html/grav/index.php
ServerName grav
ServerAlias grav
Then apache try to find a site grav,com in the web … ???
So I came to the conclusion that all that virtual server stuff is related to web servers and not with local server.
In this case I get to my last point, when I made a brief of my current state in response to “donblanco”.
Main PC: Linux desktop
Web sites: Raspberry Pi (on IP 192.168.1.64)
Both are on my local network, but because my router (like most home routers) won’t let me use the actual domain name to reach things on the Pi, I set these manually in my /etc/hosts file on my Linux box. So I have the following in my /etc/hosts file:
192.168.1.64 domain1.com
192.168.1.64 domain2.com
That way I can use the domain name and not the IP address while setting up and testing.
On the Pi, I have the following in /etc/apache2/sites-available/000-default.conf :
“Suggested - or, what I understand”
Listen 80
<VirtualHost *:80>
ServerName grav.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/grav
Don’t enabled a “grav site” (a2ensite grav.conf) because doesn’t exist any grav,conf. (?)
Reloaded Apache.
… The same old result… and my PC started to use 65% of cpu!!
In your setup you have a local network and I think your providences are in way to surpass obstacles posed by this scenario.
I don’t have a local network involved in my problem. I want to access a Grav installation taken from the internet, unzipped in a subdirectory of the directory used by Apache2 to rise my localhost. This is located in my notebook and is intended to be accessed by my browser running in the same notebook!
And, see, I get it working, I get to the base page. But cannot go on!
And more, if I access:
localhost/grav -> page loads
localhost/grav/index.php -> 404!! Looks like this page doesn’t exist.
Some thing is lost, but I really think it doesn’t relies in virtualhosts
Thank you very much for your kind attention!!
I fill the lack for check points to ensure not only stuff is present, configured, enabled, but also “in the flux”. Asking at each step if the supporting layers are up and running. That would liberate many support work.
Hi!
May be not in theme but i install grav with guides from section “Web Servers & Hosting” https://learn.getgrav.org/webservers-hosting, as i remember guide for DigitalOcean help me.