I have a bunch of WordPress and Drupal development to do, and I want to do it locally, but I’ve never set up Fedora for the task.
I’m going to try out ddev, in part because I like being able to spin up a site to work on and spinning it down just as fast. Unfortunately, it has what is probably a standard footprint for developers, but I’ve got to install a bunch of software to get it working.
Also, there’s an update for Fedora, and I’ll upgrade that first. Ugh, I ought to get downloading it now, if I want it done by morning…
I’m going to install a LAMP stack locally, see how far I can get with that. Because here’s the thing: when you look at all these containerized development environments, they always trip on which version of what is running where. They note it is easier to sync up the versions of the production server and developers…
I’ve never had this issue. Not saying it isn’t real. But maiki doesn’t need containers. I don’t change things that care about PHP version or database encoding. I work higher in the stack/abstraction. I don’t need a robust, disposable development environment, I just need a way to hack on a site when I don’t have wifi.
LAMP it is.
Fuck, is it 1:15? Whatevs:
chcon -R --reference=/var/www/html /srv
SELinux really cramped my style today…
SELinux policy is still irritating my dev env, but I got something working that makes me very happy. Basically:
The only conf I created is
Require all granted
That does that do?
Well, let’s pick a hostname to develop:
I have a repo for maiki.xyz, so I’ll just run a command with parameters showing the hostname and destination.
hugo -b http://hawkins.localhost -d /srv/hawkins.localhost/
Pages | 1
Paginator pages | 0
Non-page files | 0
Static files | 2
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0
Total in 5 ms
It’s a tiny site.
That’s all I did. I didn’t create the folder ahead of time, or anything else. So when I open
│ └── style.css
I still need to figure out a way to let SELinux know about upload directories, and hopefully “boolean” it enough to not have to think about it again.
That said, this is such an amazing dev stack. I only turn Apache and MariaDB on when I need them, another scriptable option.
chcon -R -v -t public_content_rw_t plugins/ themes/ upgrade/
Given the security model of Fedora, full system stacks are probably better in containers like Docker for several reasons.
I tried VVV, but there is a dependency mismatch making it unusable, and just demonstrates how added complexity will hit a wall I can’t debug.
I used GNOME Boxes to install Ubuntu + LAMP and it mapped to a local IP just fine. None of this messing with my filesystem nonsense.
This thread was a lifesaver when setting up mass vhosts in the Ubuntu VM I’m running.
After thinking about it, I feel less like a failure at getting a Fedora Apache server running, and more awesome that I learned web hosting with Ubuntu, and my desktop choice doesn’t deter from that experience.
Fedora seems really cool and secure for hosting. Currently all my production hosting is abstracted away (CDN, shared host, Docker image, etc) as to not care about things like filesystem permissions. I’m not in a rush to change that.
There is a whole thing about
dnsmasq I setup, which is used as a local DNS server/cache/hosts-type thing. Not sure I mentioned that above. Also not sure I’ve got it working with my new dev image, though I do appreciate the static IP assignment done by Boxes, by default. So far I’ve just added entries to
/etc/hosts, which seems fairly reasonable to me.