# Troubleshooting Manual Package Creation

**URL:** <https://forums.nanovms.com/t/troubleshooting-manual-package-creation/35>\
**Category:** Uncategorized\
**Created:** [February 7, 2024, 7:15pm UTC](https://forums.nanovms.com/t/troubleshooting-manual-package-creation/35 "2024-02-07T19:15:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pczinser](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@pczinser](https://forums.nanovms.com/u/pczinser)\
**Post date:** [February 7, 2024, 7:15pm UTC](https://forums.nanovms.com/t/troubleshooting-manual-package-creation/35/1 "2024-02-07T19:15:10Z")

</div>

Hello,

I am trying to make an apache httpd with mod\_php package. I went through the build process for httpd and php and I can run the compiled httpd with the php module enabled no problem. Using `ops pkg from-run` only pulls in the output of `ldd` on` httpd`, it does not pull in the apache2 config files so I am putting that together manually. I used the `eyberg/apache:2.4.48` package as a reference for which files I should include as that package does work.

Output of an `ops pkg load --local apache_2.4.58`:

```auto
user@ubuntu:~$ ops pkg load --local apache_2.4.58 --show-errors --accel=false
running local instance
booting /home/user/.ops/images/httpd ...
en1: assigned 10.0.2.15
user@ubuntu:~$

```

As you can see it just exits and returns me to my prompt.  
Running the same command with `--missing-files` only 1 file missing

```auto
user@ubuntu:~$ ops pkg load --local apache_2.4.58 --missing-files --accel=false
running local instance
booting /home/user/.ops/images/httpd ...
en1: assigned 10.0.2.15
missing_files_begin
httpd.pid
missing_files_end
user@ubuntu:~$

```

If I create that file I get an apache error.

At this point I am comparing the configuration files in the eyberg/apache:2.4.48 package to my own but I cant seem to see aside from port numbers or the php files in my package. Changing my httpd.conf to not load the php module results in the same behavior so I’m not sure it can be isolated the inclusion of `mod_php`.

I noticed the httpd process spawns child processes if I run it locally which I know nanos only supports single processes. There is a configuration for apache that makes httpd run as a single process but use child threads. I checked the configuration on `eyberg/apache:2.4.48'` and it did not seem to be enabled either so I’m not really sure there either.

Ultimately I’m looking any ideas on troubleshooting this package and troubleshooting nanos packages in general. I did the `--trace` option but If I’m being honest, the output of that is not something I have experience with interpreting.

---

<div class="post-metadata">

**Author:** ![eyberg](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@eyberg](https://forums.nanovms.com/u/eyberg)\
**Post date:** [February 7, 2024, 7:38pm UTC](https://forums.nanovms.com/t/troubleshooting-manual-package-creation/35/2 "2024-02-07T19:38:53Z")

</div>

That’s correct child processes won’t work. If you look nside that package at ~/.ops/packages/eyberg/apache\_2.4.48 an argument is passed:

```auto
   "Args" : ["httpd", "-DONE_PROCESS"],

```

If you paste the output of --trace it’ll more than likely show us what it might be failing on. Without looking I don’t know if mod\_php would need a patch or not. If all you want to do is frontend php there might be better options but if you’re really interested in doing apache w/mod\_php we can take a look at crafting a pkg for it.

---

<div class="post-metadata">

**Author:** ![pczinser](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@pczinser](https://forums.nanovms.com/u/pczinser)\
**Post date:** [February 7, 2024, 8:49pm UTC](https://forums.nanovms.com/t/troubleshooting-manual-package-creation/35/3 "2024-02-07T20:49:22Z")

</div>

I copied the manifest from your package for mine and still get this behavior. The only reason I am trying to use apache w/ mod\_php is to do an apples to apples comparison of apache w/ mod\_php running in a container vs unikernel and demonstrating the behavior of php command injection. Just for demonstration purposes, I know what the behavior will be.

my understanding of mod\_php is that it enables httpd to load php as a .so and execute in threads and not child processes – on the surface it seemed like the way to go.

here is a gist of the trace: [gist:98f4a9b451adbfdeeb13049954422bf4 · GitHub](https://gist.github.com/pczinser/98f4a9b451adbfdeeb13049954422bf4)

---

<div class="post-metadata">

**Author:** ![eyberg](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@eyberg](https://forums.nanovms.com/u/eyberg)\
**Post date:** [February 8, 2024, 12:00am UTC](https://forums.nanovms.com/t/troubleshooting-manual-package-creation/35/4 "2024-02-08T00:00:28Z")

</div>

I’ll take a look at creating a new pkg here in a bit, but this error message indicates that you need more disk space allocated:

```auto
(fsstatus:1 result:unable to create extent)

```

If you look in that package.manifest file you’ll find this line - you’ll just want to bump that up to whatever amount is necessary:

```auto
 "BaseVolumeSz": "32m",

```

---

<div class="post-metadata">

**Author:** ![eyberg](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@eyberg](https://forums.nanovms.com/u/eyberg)\
**Post date:** [February 8, 2024, 1:45am UTC](https://forums.nanovms.com/t/troubleshooting-manual-package-creation/35/5 "2024-02-08T01:45:54Z")

</div>

I cut a new package for this:

> **[apache unikernel](https://repo.ops.city/v2/packages/eyberg/apache/2.4.58/x86_64/show)**
>
> Apache HTTPD 2.4.58
> 
> The Apache HTTP Server is a powerful and flexible HTTP/1.1 compliant web
> server. Originally designed as a replacement for the NCS

which should allow you to run php from /usr/local/apache2/htdocs/ .

---

<div class="post-metadata">

**Author:** ![pczinser](https://avatars.discourse-cdn.com/v4/letter/p/fbc32d/32.png) [@pczinser](https://forums.nanovms.com/u/pczinser)\
**Post date:** [February 9, 2024, 4:29am UTC](https://forums.nanovms.com/t/troubleshooting-manual-package-creation/35/6 "2024-02-09T04:29:31Z")

</div>

Thanks this worked perfect for my demonstration. I saw you basically included every module including mod\_rewrite. That’s convenient as that was the next module I was going to try to get working.
