|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
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. |
|
|||
Thank you for clearing that up for me.
|
|
|||
Code:
pkg_add php Code:
/etc/rc.d/httpd stop 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 |
|
|||
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" } } } Last edited by psypro; 29th March 2016 at 04:36 PM. |
|
||||
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 |
|
|||
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 : ) |
|
||||
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 |
|
|
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 |