DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th March 2016
psypro psypro is offline
Shell Scout
 
Join Date: Mar 2016
Location: Continent:Europe
Posts: 124
Default Httpd +wordress / pkg_add php-fpm

Trying to follow guide at : http://www.h-i-r.net/p/setting-up-op...sed-httpd.html
(OpenBSD, httpd, mariadb, php)

Has php-fpm been removed, what replacement should i use?

Update:
The guide seems to work. php-fpm is now inclueded in php package.
Only issue remanining is permissions, and the guide does not deal with that.

Last edited by psypro; 27th March 2016 at 04:02 PM.
Reply With Quote
  #2   (View Single Post)  
Old 26th March 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,093
Default

You are obviously using -current; but following a 3rd party "How To" guide.

Generally, when you have questions about a 3rd party "How To" you should really ask the author directly, rather than asking us about their guide.

Luckily, though, I happen to know the answer. For the upcoming 5.9 release, php-fpm was merged into the base php packages. If you have php installed, php-fpm is installed with it.
Reply With Quote
  #3   (View Single Post)  
Old 26th March 2016
psypro psypro is offline
Shell Scout
 
Join Date: Mar 2016
Location: Continent:Europe
Posts: 124
Default

Thank you for clearing that up for me.
Reply With Quote
  #4   (View Single Post)  
Old 27th March 2016
psypro psypro is offline
Shell Scout
 
Join Date: Mar 2016
Location: Continent:Europe
Posts: 124
Default

Code:
pkg_add php
Selected option : 5 (non ap2 version). rscripts were installed : /etc/rc.d/php56_fpm

Code:
/etc/rc.d/httpd stop
etc/httpd.conf
Code:
ext_if="egress"
 types { include "/usr/share/misc/mime.types" }
server "default" {
    listen on $ext_if port 80
    directory {index "index.php" }
    location "/*.php*" {
        root { "/htdocs" }
        fastcgi socket "/run/php-fpm.sock"
    }
    location "/*" {
        root { "/htdocs" }
    }
}
Code:
etc/rc.d/php56_fpm start
Code:
etc/rc.d/httpd start
Yes, now my server is serving php, now onto understanding more about sqlite3, and WordPress plugin for it.
Reply With Quote
  #5   (View Single Post)  
Old 27th March 2016
psypro psypro is offline
Shell Scout
 
Join Date: Mar 2016
Location: Continent:Europe
Posts: 124
Default

On the positive side: WordPress have been installed and configured. Gave up sqlite3 and used mariadb.

The problem:
wp-content folder, where uploads go needs

/etc/httpd
Code:
ext_if="egress"
 types { include "/usr/share/misc/mime.types" }
server "default" {
    listen on $ext_if port 80
    directory {index "index.php" }
    location "/*.php*" {
        root { "/htdocs" }
        fastcgi socket "/run/php-fpm.sock"
    }
    location "/*" {
        root { "/htdocs" }
    }
}
Anybody have a solution idea?

Last edited by psypro; 29th March 2016 at 04:36 PM.
Reply With Quote
  #6   (View Single Post)  
Old 27th March 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,093
Default

Can you help me to understand your problem? As I have never used WordPress before, I have replicated your environment in a virtual machine here.

WordPress is working, I was able to publish a blog post. This appears, for me, with a URL of http://<VM IP>/wordpress/

When I first attempted the top level http://<VM IP>/ I got an "Acccess Denied" because there was no index.php in /var/www/htdocs. When I added an index.php file, the error was eliminated.

I set the ownership of all files in /var/www/htdocs/wordpress to be world readable, but owned by root. PHP should not be able to write into those directories; that would be a significant security concern. These directories should be read-only to PHP and to the web server. (During WordPress install, the installer could not create the wp-config.php file, and gave me text to copy/paste into the file between steps.)

My WordPress userid and blog post are stored within the SQL database, not within /var/www/htdocs/wordpress.

Last edited by jggimi; 27th March 2016 at 09:33 PM. Reason: clarity
Reply With Quote
  #7   (View Single Post)  
Old 28th March 2016
psypro psypro is offline
Shell Scout
 
Join Date: Mar 2016
Location: Continent:Europe
Posts: 124
Default

Thank you again jggimi!
It motivated my efforts to know it was possible.
But regarding the permissions, try login in to your WordPress site, and upload a picture trough the web interface.
The site now, works : )
Reply With Quote
  #8   (View Single Post)  
Old 28th March 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,093
Default

Ah, ok. There are directories that must be writeable. But using 777 is not best practice. Even the folks at wordpress.org recommend against it. Writeable by your webserver application may be necessary. But 777 leaves it open to other applications.

You could set the ownership of the wp-content branch to www, for example. Or, use the www group to govern access.

To reset to a default filemode of 755 for directories and 644 for files in that branch, and ownership to www, something like this could be used:
Code:
# cd /var/www/htdocs/wordpress
# find -X wp-content -type d | xargs chmod 755
# find -X wp-content -type f | xargs chmod 644
# chown -R www wp-content
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pkg_add claxsis NetBSD Package System (pkgsrc) 14 24th March 2016 11:07 PM
What do these messages from pkg_add mean? acampbell OpenBSD Packages and Ports 2 13th November 2015 12:28 PM
pkgin in vs. pkg_add DaBSD NetBSD Package System (pkgsrc) 3 3rd May 2015 11:48 PM
pkg_add is NOT clever sw2wolf FreeBSD Ports and Packages 7 24th August 2012 09:17 AM
pkg_add times out (?) Daffy OpenBSD Packages and Ports 0 27th July 2012 09:41 PM


All times are GMT. The time now is 07:30 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick