FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-21-2012, 08:02 PM
Glenn English
 
Default wordpress, again

I have a mildly working Debian WordPress install -- it makes
pictures on the screen and adds posts and pages. The posts
appear on the home page of the blog, and the names of the pages
show up in the menu (default theme). But when I click on the
name of the post, "test2" for example, I get an Apache2 error:

> The requested URL /blog/blog/2012/06/21/test2/ was not found on this server.

Grep finds "test2" in 2 mySQL files:

> Binary file wp_posts.MYD matches
> Binary file wp_posts.MYI matches

Grep doesn't find 'blog/blog' anywhere in /usr/share/wordpress.

My /etc/apache2/conf.d/wp.conf file contains:

> Alias /blog /usr/share/wordpress
> <Directory /usr/share/wordpress>
> Options FollowSymLinks
> AllowOverride Limit Options FileInfo
> DirectoryIndex index.php
> </Directory>

And there is a /var/www/blog directory for apache2 to link to.

Can someone tell me how to fix this? I can't find anything about this
at codex.wordpress.org. Or better yet, can someone tell me how to navigate
codex.wordpress.org?

--
Glenn English
hand-wrapped from my Apple Mail




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 976BD91C-06E2-4D53-9DA1-FE4759782A6C@slsware.com">http://lists.debian.org/976BD91C-06E2-4D53-9DA1-FE4759782A6C@slsware.com
 
Old 06-22-2012, 03:10 PM
Camaleón
 
Default wordpress, again

On Thu, 21 Jun 2012 14:02:20 -0600, Glenn English wrote:

> I have a mildly working Debian WordPress install -- it makes pictures on
> the screen and adds posts and pages. The posts appear on the home page
> of the blog, and the names of the pages show up in the menu (default
> theme). But when I click on the name of the post, "test2" for example, I
> get an Apache2 error:
>
>> The requested URL /blog/blog/2012/06/21/test2/ was not found on this
>> server.

(...)

> My /etc/apache2/conf.d/wp.conf file contains:
>
>> Alias /blog /usr/share/wordpress
>> <Directory /usr/share/wordpress>
>> Options FollowSymLinks
>> AllowOverride Limit Options FileInfo
>> DirectoryIndex index.php
>> </Directory>

(...)

Just a quick note on this... The above should be used (according to the
provided configuration template located in "/usr/share/doc/wordpress/
examples/apache.conf") when you use no virtual hosts and your files are
placed outside the "/blog" path. Are these two things true for your
setup? :-?

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/js21ts$5le$10@dough.gmane.org
 
Old 06-22-2012, 04:08 PM
Glenn English
 
Default wordpress, again

On Jun 22, 2012, at 9:10 AM, Camaleón wrote:

> Just a quick note on this... The above should be used (according to the
> provided configuration template located in "/usr/share/doc/wordpress/
> examples/apache.conf") when you use no virtual hosts and your files are
> placed outside the "/blog" path. Are these two things true for your
> setup? :-?

Yes. No virtuals and everything is in the MySQL files and /usr/share...
/var/www/blog is completely empty.

I've got virtual websites on the 'real' server. This is a new server,
on the DMZ, but isolated from the main servers -- I'm trying to do a
favor for a friend who wants to move his website from HTML to WP.

--
Glenn English
hand-wrapped from my Apple Mail




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 2D75661C-EB53-4569-897E-E605590D885C@slsware.com">http://lists.debian.org/2D75661C-EB53-4569-897E-E605590D885C@slsware.com
 
Old 06-22-2012, 04:09 PM
Miles Fidelman
 
Default wordpress, again

Glenn,

I notice you're still having problems, so, for what it's worth....

I've had Wordpress running on Debian, with Apache for years, and
recently did a reinstall after getting hacked. Here's the step by step
that I jotted down:


0. Caveat, this is running under Lenny, in a Xen VM - that shouldn't
effect anything, but you never know:


1. Prerequisites
- apache w/ mod_rewrite, php, mysql - all installed from Debian packages
with apt

- running as www:www

2. Set up DNS records for site

3. Download and install Wordpress (I've never had any luck with the
packaged version)

- as root
cd /var

wget http://wordpress.org/latest.tar.gz

tar -xzvf latest.tar.gz

mv wordpress gd


- seemed to untar as www-data:www-data, but you may need to

chmod -R www-data:www-data ./<site>



4. Set up database using mysqladmin (note: php_myadmin makes things
slightly easier)


mysql -p <youradminpassword>

CREATE DATABASE <sitename>;

GRANT ALL PRIVILEGES ON <sitename>.* to <you>@localhost IDENTIFIED BY
'<password>';


FLUSH PRIVILEGES;


4. Set up Apache

----------- my /etc/apache2/sites/<site> file (note: provides both http:
and https: access) ---------------

----------- note: needs to have your site's info inserted

<VirtualHost x.x.x.x:80>
ServerAdmin webmaster@<site>.org
ServerName <site>.org

DocumentRoot /var/<site>/

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/<site>/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>

<VirtualHost x.x.x.x:443>
ServerAdmin webmaster@<site>.org
ServerName <site>.org

DocumentRoot /var/<site>/

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/<site>/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
</VirtualHost>
----------------------------------------

a2ensite <site>
/etc/init.d/apache2 reload

5. Set up Wordpress via installer URL

6. A little hardening
see
http://www.slideshare.net/williamsba/now-thats-what-i-call-wordpress-security-2010
for some good guidnace


chmod 644 wp-config.php

mv wp-config.php ../


note: left wp-content directory in its normal place (I think moving it
screws up my https: setup)


installed, set up, activated:
- Akismet (spam filtering)
- Better WP Security (NOTE: Includes a database backup function)
- Exploit Scanner
- Jetpack
- VSF Simple Block (blocks IP addresses)
- Wordfence (NOT activated, I use it's scanner occasionally)
- Wordpress Firewall 2 (does some automatic blocking of IP addressees
based on behavior)
- WP Security Scan (also NOT activated, I use it's security scanner
periodically)


- configure things, including backups (I use Better WP Security for the
database backup, my overall system backup for the static files in /var)


7. And, of course, update everything through the Wordpress dashboard,
and then re-run security scans.


Hope this helps.

Miles Fidelman


--
In theory, there is no difference between theory and practice.
In practice, there is. .... Yogi Berra


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4FE498A1.7070902@meetinghouse.net">http://lists.debian.org/4FE498A1.7070902@meetinghouse.net
 
Old 06-22-2012, 04:46 PM
Tony Baldwin
 
Default wordpress, again

On Thu, Jun 21, 2012 at 02:02:20PM -0600, Glenn English wrote:
> I have a mildly working Debian WordPress install -- it makes
> pictures on the screen and adds posts and pages. The posts
> appear on the home page of the blog, and the names of the pages
> show up in the menu (default theme). But when I click on the
> name of the post, "test2" for example, I get an Apache2 error:
>
> > The requested URL /blog/blog/2012/06/21/test2/ was not found on this server.
>
> Grep finds "test2" in 2 mySQL files:
>
> > Binary file wp_posts.MYD matches
> > Binary file wp_posts.MYI matches
>
> Grep doesn't find 'blog/blog' anywhere in /usr/share/wordpress.
>

I would guess that you need to enable apache mod-rewrite.
do (as root, in terminal)
a2enmod rewrite
service apache2 restart

then tell us what happens.

./tony
--
http://www.tonybaldwin.me
all tony, all the time!
3F330C6E
 
Old 06-22-2012, 05:33 PM
Glenn English
 
Default wordpress, again

On Jun 22, 2012, at 10:46 AM, Tony Baldwin wrote:

> I would guess that you need to enable apache mod-rewrite.
> do (as root, in terminal)
> a2enmod rewrite
> service apache2 restart
>
> then tell us what happens.

"Module rewrite already enabled"

(I didn't do the restart.)

In the admin state, the edit button finds the posts fine -- there's
only a single 'blog/ in the URL to post.php, with a request to edit
it and a "post=<n>". In view, the repeat of the blog/ shows up again
in a URL that looks like a directory that looks like an archive.

Do you know what piece of the PHP is creating this wrong URL? Is WP
supposed to have created a directory called 'blog/', and my config
is somehow confusing it? Would it be worth the time and effort to
change /var/www/blog to something else (I tried that, and WP didn't
care for it -- I needed some other changes that I don't know about...)

--
Glenn English
hand-wrapped from my Apple Mail




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: F5EB3873-F409-4B5C-A84D-E92B1F0A6912@slsware.com">http://lists.debian.org/F5EB3873-F409-4B5C-A84D-E92B1F0A6912@slsware.com
 
Old 06-24-2012, 02:47 AM
Glenn English
 
Default wordpress, again

WordPress was generating bad URL/pathnames sometimes...

My .htaccess was all screwed up, which broke the Permalinks.
Wordpress seems to be a very nicely done piece of software
-- it already knew what was wrong, and when somebody over
there told me where to look, there was the text, waiting to
be pasted into my file.

Finding documentation like I have for my Cisco router is
still a significant problem, though -- I can't imagine how
that guy knew what was wrong...

I do wish they'd used C (or equivalent) to write it.

Thanks for your suggestions.

--
Glenn English
hand-wrapped from my Apple Mail




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CDDFD846-F94B-4D43-9ACB-9D6558077B83@slsware.com">http://lists.debian.org/CDDFD846-F94B-4D43-9ACB-9D6558077B83@slsware.com
 

Thread Tools




All times are GMT. The time now is 12:09 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org