[SOLVED] Debian 10 Wordpress problem

Kernels & Hardware, configuring network, installing services

[SOLVED] Debian 10 Wordpress problem

Postby JudgeDredd » 2020-09-20 07:01

Hello, I'm very new in LAMP and Wordpress so please don't laugh too much :D So I followed this guide: https://wiki.debian.org/WordPress (first basic setup, then used script) and somehow I managed to get my home server and my Wordpress site up: "Just another WordPress site", "Hello World!", wow... but. There is always some but, of course. For whatever newbie reason, I can't reach my site locally :o :?

I do localhost/wp in browser as said in guide, but just get "Not Found The requested URL was not found on this server." I tried alot of variations like localhost/wp-content, localhost/wp-admin and so on, but no site. I repeat, I can access it from outside of my home network, or by Tor. But where is it locally? Please help!

Thanks in advance,
JD
Last edited by JudgeDredd on 2020-09-27 12:12, edited 1 time in total.
JudgeDredd
 
Posts: 6
Joined: 2020-09-20 06:33

Re: Debian 10 Wordpress problem

Postby kedaha » 2020-09-20 12:58

hi,
Try the internal IP address of your home server in the browser address bar?
"Please accept my resignation. I don’t care to belong to any club that will have me as a member".—Groucho Marx
User avatar
kedaha
 
Posts: 3152
Joined: 2008-05-24 12:26

Re: Debian 10 Wordpress problem

Postby JudgeDredd » 2020-09-20 17:11

kedaha wrote:hi,
Try the internal IP address of your home server in the browser address bar?


Tried. With x.x.x.x/wp I get the same "Not Found The requested URL was not found on this server" as with localhost, and if I omit wp I get: "Neither /etc/wordpress/config-x.x.x.x.php nor /etc/wordpress/config-x.x.x.php could be found. Ensure one of them exists, is readable by the webserver and contains the right password/username." As my site is visible and working from outside home network, I have no idea why this is happening :(

Tnx anyways.
JudgeDredd
 
Posts: 6
Joined: 2020-09-20 06:33

Re: Debian 10 Wordpress problem

Postby kedaha » 2020-09-21 12:48

hello again,
I have myself run into this "problem" several times when installing Wordpress. I mentioned it in a short "howto" for Debian "jessie" which I never got round to finishing. See: viewtopic.php?f=16&t=127569&p=610677#p610677.
Maybe that post will help. If not maybe I can help but I haven't installed Wordpress for a long time so I might be a bit rusty or outdated regarding the steps.
By the way, it's good to hear you opted to install Wordpress from Debian's stable repository.
How have you set up your "home server"?
Is it on a separate computer attached to you home router or have you installed the LAMP server software along with your desktop system?
Do you have your own domain name like example.com?
Do you have a static, i.e., permanent external (and internal) IP address for your server?
"Please accept my resignation. I don’t care to belong to any club that will have me as a member".—Groucho Marx
User avatar
kedaha
 
Posts: 3152
Joined: 2008-05-24 12:26

Re: Debian 10 Wordpress problem

Postby JudgeDredd » 2020-09-22 19:23

kedaha wrote:hello again,

Hello, big thanks for helping me :)

I have myself run into this "problem" several times when installing Wordpress. I mentioned it in a short "howto" for Debian "jessie" which I never got round to finishing. See: viewtopic.php?f=16&t=127569&p=610677#p610677.
Maybe that post will help. If not maybe I can help but I haven't installed Wordpress for a long time so I might be a bit rusty or outdated regarding the steps.

Compared to Debian Wordpress Wiki guide I saw you had different aliases in .conf file so I changed 'em and reloaded Apache, but no luck so far, same situation as before. Site is working when accesed from outside my home network and over Tor, but locally it's still the same "Neither xxxx.php nor xxx.php could be found" message.

By the way, it's good to hear you opted to install Wordpress from Debian's stable repository.
How have you set up your "home server"?

I am kinda computer hobbyst and longtime Debian fan so I decided to try that way. And, erm, it's testing repo :)

Is it on a separate computer attached to you home router or have you installed the LAMP server software along with your desktop system?

It's on separate computer in my house.

Do you have your own domain name like example.com?

Yes but I got it by https://www.noip.com/ :)

Do you have a static, i.e., permanent external (and internal) IP address for your server?

No it's dynamic and I'm using Noip's tool "Dynamic Update Client" noip2 to cover for me. Of course I'll be happy to provide any additional information needed, just ask. Thanks again!
JudgeDredd
 
Posts: 6
Joined: 2020-09-20 06:33

Re: Debian 10 Wordpress problem

Postby dilberts_left_nut » 2020-09-22 20:02

If your wordpress vhost is not the default one on the server, check the 'server name' directive in the vhost definition matches what you are requesting when connecting "locally".
Either add a 'server alias' that does, or use a local DNS or hosts file entry to map the server name to local ip.
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 5077
Joined: 2009-10-05 07:54
Location: enzed

Re: Debian 10 Wordpress problem

Postby JudgeDredd » 2020-09-23 16:29

dilberts_left_nut wrote:If your wordpress vhost is not the default one on the server, check the 'server name' directive in the vhost definition matches what you are requesting when connecting "locally".
Either add a 'server alias' that does, or use a local DNS or hosts file entry to map the server name to local ip.


Again I'm thankful for help but I'm afraid this is above my understanding. So, please don't laugh too much, :) how do I determine if my Wordpress virtual host is the default or not on the server, and all that other stuff? Here is what I have in /etc/apache2/sites-available/wp.conf file:

<VirtualHost *:80>
ServerName my.free.noip.domain

ServerAdmin webmaster@my.free.noip.domain
DocumentRoot /usr/share/wordpress

Alias /wp/wp-content /var/lib/wordpress/wp-content
Alias /wp /usr/share/wordpress/
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted
</Directory>
<Directory /var/lib/wordpress/wp-content>
Options FollowSymLinks
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost


My.free.noip.domain is the one I got from https://www.noip.com/. In /etc/wordpress/ I have config-my.free.noip.domain.php file. In my home network, local IP of my server computer is 192.168.1.10. When I try my.free.noip.domain in browser I get my router home page. When I try my.noip.domain/wp I get "404 not found". When I try localhost or localhost/wp I get "Neither /etc/wordpress/config-localhost.php nor /etc/wordpress/config-localhost.php could be found. Ensure one of them exists, is readable by the webserver and contains the right password/username."

Administration through Tor is very slow so it's not the option. I'm thinking to try the non-Debian way, but I'd rather not. What to do? Thanks! :)
JudgeDredd
 
Posts: 6
Joined: 2020-09-20 06:33

Re: Debian 10 Wordpress problem

Postby dilberts_left_nut » 2020-09-23 17:24

JudgeDredd wrote:How do I determine if my Wordpress virtual host is the default

Code: Select all
apachectl -S

JudgeDredd wrote:
Code: Select all
<VirtualHost *:80>
ServerName my.free.noip.domain
...

This is what your wordpress vhost "answers to"
You can also add "ServerAlias" lines with alternative names - although wordpress (not apache) may not play nice with that.
The http request from your browser must end up at your server, asking for one of the listed hostnames, for this vhost to respond.

A simple way to make this "just work", for now, is to add
Code: Select all
192.168.1.10 my.free.noip.domain
to your /etc/hosts file (on your client pc).
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 5077
Joined: 2009-10-05 07:54
Location: enzed

Re: Debian 10 Wordpress problem

Postby JudgeDredd » 2020-09-23 19:25

dilberts_left_nut wrote:A simple way to make this "just work", for now, is to add
Code: Select all
192.168.1.10 my.free.noip.domain
to your /etc/hosts file (on your client pc).


Omg it works! And on my main comp too, I just edited it's /etc/hosts and voila! :)

Thank you guys both, but Dilberts you rock :D
JudgeDredd
 
Posts: 6
Joined: 2020-09-20 06:33

Re: Debian 10 Wordpress problem

Postby kedaha » 2020-09-23 20:20

JudgeDredd wrote:Administration through Tor is very slow so it's not the option.

That's not the way to administer the site remotely & securely via the web interface. https should be used unless the site GUI (the wordpress panel etc) is always administered via your home network.
JudgeDredd wrote:And, erm, it's testing repo

Only stable is recommended for a server exposed to the internet.
"Please accept my resignation. I don’t care to belong to any club that will have me as a member".—Groucho Marx
User avatar
kedaha
 
Posts: 3152
Joined: 2008-05-24 12:26

Re: Debian 10 Wordpress problem

Postby JudgeDredd » 2020-09-25 20:34

kedaha wrote:That's not the way to administer the site remotely & securely via the web interface. https should be used unless the site GUI (the wordpress panel etc) is always administered via your home network.
...
Only stable is recommended for a server exposed to the internet.


Of course, but it's not a big deal atm, I'm just trying to learn. The first main goals were to get ftp/http/wp up and running, then I'll add security details, firewall etc. Thanks again, and I'm afraid I'll surely come back with more questions :)
JudgeDredd
 
Posts: 6
Joined: 2020-09-20 06:33


Return to System configuration

Who is online

Users browsing this forum: arzgi, Bernoot and 15 guests

fashionable