Jump to content

Where is Admin login (again!)


Mikeinnc
 Share

Recommended Posts

I know this has been asked before - probably many times! - but a lot of the answers seem to reflect older installations, so I'm asking again in the hope that the solution(s) can be updated and possibly be of assistance to many others as well as me!

I have a computer running Linux Mint 19.2 'Tina' which is based, of course, on Ubuntu. I have - successfully, I believe - installed Apache2 (Apache/2.4.29 (Ubuntu)); MySQL (Server version: 5.7.27-0ubuntu0.18.04.1 (Ubuntu)) and PHPMyAdmin (v4.6.6deb5). I'm interested in setting up an 'easy to use' CMS, having previously "played with" a couple of other CMS and  and have installed ProcessWire from the zip file processwire-master.zip. This was 'unzipped' to the directory /var/www/html/processwire (/var/www/html is the default location for web files in Mint).

I then used the install function after opening the URL http://127.0.0.1/processwire in Firefox. The initial checks in the install all passed, and the default 'intermediate' site now opens successfully, and all looks good if I go to http://127.0.0.1/processwire/ in the same Firefox browser. I can also see the MySQL database 'processwire' (my name) which appears to have been successfully set up. However, the links to 'About'; 'Site Map' and 'Admin Login' will NOT work.

In every case, I get 'Not Found - The requested URL was not found on this server - Apache/2.4.29 (Ubuntu) Server at 127.0.0.1 Port 80'. In the case of the 'Admin Login', the URL is http://127.0.0.1/processwire/processwire/ and the others are similar but /about and /site-map. External links on this 'Minimal Site Profile' page DO work. And having spent many, MANY hours trying to solve these issues, with none of the old suggested solutions appearing to work, in frustration I'll try here!

What, if anything, am I doing wrong? How do I login as 'admin'? As I think someone else commented, it's like bing given a Christmas present that you can't open!!

Thanks for all and any advice.........

 

Link to comment
Share on other sites

48 minutes ago, Mikeinnc said:

And having spent many, MANY hours trying to solve these issues, with none of the old suggested solutions appearing to work, in frustration I'll try here!

What have you tried?

Have you tried any of these suggestions?

 

Link to comment
Share on other sites

Thanks @elbax. As shown in the first topic reply,  I un-commented the line 'RewriteBase' /processwire/ in .htaccess; restarted Apache2 but still the same. Now, do I need to delete the site and rebuild it again? It's interesting that there is no sub folder '/about' or '/site-map' etc below my '/processwire' folder. Should there be? is this the key to this not working?

I'll have a look at some of the other topics, but as I previously suggested, many (most?) of them seem to point to solutions that just don't match my situation, or are just 'out-of'date' - and I should add, I didn't think that my situation was unique. I haven't done *anything* out of the ordinary, as far as I can see!

Link to comment
Share on other sites

3 hours ago, Mikeinnc said:

It's interesting that there is no sub folder '/about' or '/site-map' etc below my '/processwire' folder. Should there be? is this the key to this not working?

There are no physical folders of a page structure in Processwire. The pages/structure of your website is saved to the database. So no subfolders like /about/ or /sitemap/ visible.

Link to comment
Share on other sites

Thanks Klenkes - that makes sense, and is useful information. But it still begs the question - why can't I access them? The database is there - I can access it and see the structure using Phpmyadmin. I've called it 'processwire'; it has 23 tables and it looks good. But I still get "The requested URL was not found on this server." Why? I've followed the install instructions to the letter (more than once, I should add!!)

Link to comment
Share on other sites

Could it be a database connection issue? During the install, I am asked for a database name etc. (I've attached the page in question - not mine, but a copy from a website). So, my DB name is 'processwire'; my DB User is 'root'; my DB Pass is <root password> and the rest is the same as shown here. database_install.thumb.png.6a05023379205d91de2e6a8ef1748c14.png

Link to comment
Share on other sites

I should add that I have tried following the instructions on this site (https://www.linuxhelp.com/how-to-install-processwire-3-0-98-on-linuxmint-18-03)

in the - forlorn -hope it might solve the problem. But, as with so many of the so-called  'fixes', it just *doesn't* work! If I create the 'process.conf' in the apache2 'sites-available', Apache throws an error when I try to reload it. Frustration is extreme!!!

Link to comment
Share on other sites

1 hour ago, Mikeinnc said:

Could it be a database connection issue? During the install, I am asked for a database name etc.

You can see Home of the installation? The starting page? If so then your DB connection is fine, otherwise you would see errors and, well, nothing.

The 404 almost always result from a wrong setting in the htaccess or a server setting. Do you run anything else on the same server with htaccess working?

  • Like 1
Link to comment
Share on other sites

In a word - no. At least, I don't think so. It's a fairly new installation - no mail server or anything like that. Just SQL server and Apache. As mentioned before, I've un-commented the line 'RewriteBase' /processwire/ in .htaccess as suggested. What I find quite disturbing is that I'm sure I can't be the only person seeing this issue. This is a standard Mint install; a standard Apache install and I followed the PW instructions to the letter. And it just doesn't work! So many of the "solutions" I see online are for something quite 'exotic' or unique. Mine isn't! It's just a 'vanilla' install, that you would expect would 'just work'. Out of the box. Except it doesn't!

Link to comment
Share on other sites

Check if mod_rewrite is enabled as it is needed. I don't know the easiest way in Mint/Ubuntu to do so - or at least not how it is done nowadays. ? But something sudo a2enmod mod_rewrite comes into my mind. You want to look this up to be on the safe side.

Another thing is the Apache configuration. In order to make it work on my local machine I needed the AllowOverride all line in my config.

<VirtualHost processwire.test:80>
    DocumentRoot "/var/www/html/processwire"
    ServerName processwire.test
    ServerAlias processwire.test

    <Directory "/var/www/html/processwire">
        AllowOverride all
        allow from all
        Options None
        Require all granted
    </Directory>
</VirtualHost>

So... in my opinion it's most likely a server-side issue and not a PW-issue here.

  • Like 2
Link to comment
Share on other sites

3 hours ago, Mikeinnc said:

If I create the 'process.conf' in the apache2 'sites-available', Apache throws an error when I try to reload it. Frustration is extreme!!!

If Apache is throwing an error, you have a server config issue. Follow @wbmnfktr instructions and try again.

  • Like 1
Link to comment
Share on other sites

Thanks everyone for the very informative posts. I've double checked - mod_rewrite is enabled. (# sudo a2enmod rewrite produces 'Module rewrite already enabled'). Tick that one off. Then I added the configuration instructions in the Apache2 configuration file (#/etc/apache2$ sudo nano apache2.conf) - exactly as suggested (although I did use 'AllowOverride All'' - is the capitalisation of 'All' important? I see 'None' is capitalised where used). Apache2 reloaded without an error! I thought I was on a winner......but, unfortunately, it hasn't made a scrap of difference. I still get 'The requested URL was not found on this server.' if I select any of the 'internal' links. Oh, and yes, I appreciate the comment about using Webmin. I do use it, although I must say that I find it a tad confusing to support Apache. That might just be my unfamiliarity, though. So, what now? Should I rebuild the site from scratch? Recall, there's NO information here, so I'm not losing anything (except my sanity) - it is just the site from the zip file that should work - and doesn't! Hopefully, my frustration is understandable!!

 


 

 

Link to comment
Share on other sites

11 hours ago, Mikeinnc said:

The initial checks in the install all passed, and the default 'intermediate' site now opens successfully, and all looks good if I go to http://127.0.0.1/processwire/ in the same Firefox browser. I can also see the MySQL database 'processwire' (my name) which appears to have been successfully set up. However, the links to 'About'; 'Site Map' and 'Admin Login' will NOT work.

Is this still the case now that Apache doesn't throw config errors?

If so, then it appears to be a possible redirect issue. Your admin url is,  http://localhost/processwire/processwire/ ? You can verify this by looking at the Name column in the Pages table where ID=2.

Link to comment
Share on other sites

 

8 hours ago, rick said:

Is this still the case now that Apache doesn't throw config errors?

If so, then it appears to be a possible redirect issue. Your admin url is,  http://localhost/processwire/processwire/ ? You can verify this by looking at the Name column in the Pages table where ID=2.

Indeed it is. But it's to no avail - I still get 'The requested URL was not found on this server'.  I don't want to labour the point -and I obviously bow to far superior knowledge - but if I look at the directory structure in the /processwire directory, in the /processwire/site/templates/ I can see various php files such as admin.php and sitemap.php. Now, OK, I guess these are the files that, when run, provide the admin login or the site-map. That's good if that's the case, as I'd half expected them to be missing!! But how exactly do I get from /processwire to /processwire/processwire and 'activate' these? I've changed my Apache configuration file as suggested, but it has made no difference at all. What other areas may cause a redirect error - and is there a simple way I can test it? Thanks for all your help!

Screenshot.jpg

apache2-conf.jpg

Link to comment
Share on other sites

As it appears I have a redirect issue, I've had another look at the ProcessWire .htaccess file in the /processwire directory. I see in this section that I had previously set the 'RewriteBase' to just /processwire but as you can see (below - taken from file), I've now set it to the full directory name. But (sigh!), still all to no effect......

  # -----------------------------------------------------------------------------------------------
  # 11. OPTIONAL: Set a rewrite base if rewrites aren't working properly on your server.
  # And if your site directory starts with a "~" you will most likely have to use this.
  # -----------------------------------------------------------------------------------------------

  # RewriteBase /
  RewriteBase /var/www/html/processwire/
  # RewriteBase /~user/

 

 

Link to comment
Share on other sites

Hi @Mikeinnc,

I assume that if you do a ping processwire.test that it resolves to localhost?

Also, have you checked for permission issues on the file system? Specifically, can the user account that Apache runs under actually access /var/www/html/Processwire?

Finally, have you had a look in Apache's logfile for the site? (Should be something like /var/log/apache2/errors.log or something like it.)

Best wishes

Link to comment
Share on other sites

Things have changed! I mentioned before I had looked at a site that claimed to show how to install PW on Mint. The author had a section where he created a configuration file in the /etc/apache2/sites-available directory, but I said it had failed. I now see what his problem is - he has a space after the < directive opening tag. I've now rewritten that file and following the instructions, I'm now getting a very different message on selecting a link.

Here's the process.conf file:

<VirtualHost \*:80>
        ServerName processwire.test
        DocumentRoot /var/www/html/processwire/
        <Directory /var/www/html/processwire/>
          AllowOverride All
          allow from all
        </Directory>
</VirtualHost>


and then I enabled the 'process' and reloaded and restarted the Apache server. Now I get:

"Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log."

Is this of any use in solving this problem -or am I just confusing things?

 

Link to comment
Share on other sites

13 minutes ago, netcarver said:

Hi @Mikeinnc,

I assume that if you do a ping processwire.test that it resolves to localhost?

Also, have you checked for permission issues on the file system? Specifically, can the user account that Apache runs under actually access /var/www/html/Processwire?

Finally, have you had a look in Apache's logfile for the site? (Should be something like /var/log/apache2/errors.log or something like it.)

Best wishes

Yes, ping works as expected - resolves to 127.0.0.1 (localhost). All the files in the /processwire directory are owned by www-data and that is also the group. I don't 'think' that's an issue? Yes, I can see the logfiles where you suggested, but can't make a lot of sense of them!! There are two access logs; two error logs and a 'other_vhosts_access.log' file. I've only looked in the later ones, of course - they should and seem to reflect the problems this morning (it's morning time in Western Australia!!)

Link to comment
Share on other sites

Here are the errors from (first) the 'other_vhosts_access.log' file and second from error.log for a specific click on an internal link:

processwire.test:80 127.0.0.1 - - [09/Nov/2019:10:00:02 +0800] "GET / HTTP/1.1" 200 2057 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0"
processwire.test:80 127.0.0.1 - - [09/Nov/2019:10:00:02 +0800] "GET /favicon.ico HTTP/1.1" 404 260 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0"
processwire.test:80 127.0.0.1 - - [09/Nov/2019:10:00:06 +0800] "GET /about/ HTTP/1.1" 500 805 "http://processwire.test/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0"


[Sat Nov 09 10:00:06.481939 2019] [core:error] [pid 9288] [client 127.0.0.1:57368] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://processwire.test/

I presume the first numbers in the three first errors are HTTP response error codes? (200, 404 and 500)

Does this make sense?

Thanks so much!

Link to comment
Share on other sites

Well everyone - IT WORKS!! In sheer frustration (and especially as I was blocked for a couple of hours - presumably until Friday midnight "somewhere" - as I'd apparently 'reached my limit of messages' for a day - presumably yours and not mine.....), I stripped out all the various configuration directives in apache2.conf; dumped the entire directory /processwire (and all its sub-directories) and - again - followed the instructions in https://www.linuxhelp.com/how-to-install-processwire-3-0-98-on-linuxmint-18-03 except this time making sure that I didn't include the space after the <  in the 'process.conf' file in /sites-available. The Apache reload process worked - always a good sign! I also dumped the 'processwire' SQL database and started from new - unzipping the downloaded file; changing ownership and file permissions and rebuilding a new SQL database, all through the PW install button. The only difference from before was that I set permissions during installation to 775 in both instances during the install process. And now it works!!! Click on admin login link and I get the admin page into which I can login. Could this change of permission be the key?Is there a lesson here for other 'newbies'? Thanks again to everyone for all your assistance - much appreciated and very welcome.

Mike

image.thumb.png.c15cf85ec8daf0333ea96f0ac8b59fd8.png

Link to comment
Share on other sites

OK, spoke too soon! Yes, it did work but the URLs weren't operating as I'd expect. Somehow, in trying to fix that, I stuffed the system. "No problem", I thought - "I'll just build it again". Well, yes, I can - except it doesn't work and I'm back to where I was before. And do you think I can work out what magic directive it was (because I'm increasingly sure that's what it is) that somehow made it do what it was supposed to? So, falling on my sword again! Is it in .htaccess? In /sites-available/process.conf? In /etc/apache2/apache2.conf? It MUST be there somewhere! As has been said, this clearly isn't a PW issue as it did work! Any advice still gratefully received.......

Link to comment
Share on other sites

Trial and error - worked it out. The virtual host info goes in '/etc/apache2/sites-available' - this is my 'process.conf' and contains:

<VirtualHost \*:80>  (and this has to be like this - if I define it as VirtualHost processwire.test:80, it doesn't work!)
ServerName processwire.test
DocumentRoot /var/www/html/processwire/
<Directory /var/www/html/processwire/>
AllowOverride All
allow from all
</Directory>
</VirtualHost>

In apache2.conf, I have to define:

<Directory /var/www/html/processwire/>
        AllowOverride all
        allow from all
        Options None
        Require all granted
</Directory>

but note NOT the VirtualHost directive or it doesn't work. No changes to .htaccess needed. Now this is all good - I can link to the other parts of the site as expected but the URL process doesn't seem to work. Putting 'processwire.test' as my URL leads to the Apache2 index file and not the PW site. To get to that, I have to use either 127.0.0.1/processwire or processwire.test/processwire That doesn't seem to make sense and it was trying to fix that that "breaks" the site. Why I have to define the Directory twice I have no idea! Any further comments are welcome!!

Link to comment
Share on other sites

I certainly did. Here's the relevant entry:

127.0.0.1       processwire.test

and if I ping it:

ping processwire.test
PING processwire.test (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.077 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.070 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.073 ms

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...