Object not found!

Hello

Tring to set up Self-Hosted InvoiceNinja to my computer localhost what is running on Arch Linux.

Using this how to: HOWTO: Install Invoice Ninja v5 on Arch Linux

Apache httpd.conf is here:

<FilesMatch \.php$>
        SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://invoice.localhost"
</FilesMatch>

<IfModule dir_module>
    DirectoryIndex index.php
</IfModule>

<VirtualHost *:80>
    ServerName invoice.localhost
    DocumentRoot "/mnt/SAHVER/InvoiceNinja/public/"

    <Directory "/mnt/SAHVER/InvoiceNinja/public/">
       Options -Indexes +FollowSymLinks +MultiViews
       AllowOverride All
       Require all granted
    </Directory>

    ErrorLog /var/log/httpd/invoice-ninja.error.log
    CustomLog /var/log/httpd/invoice-ninja.access.log combined

</VirtualHost>

Loaded modules:
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
fileinfo
filter
gd
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib

Apache Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_prefork_module (shared)
authn_file_module (shared)
authn_core_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_core_module (shared)
access_compat_module (shared)
auth_basic_module (shared)
reqtimeout_module (shared)
include_module (shared)
filter_module (shared)
mime_module (shared)
log_config_module (shared)
env_module (shared)
headers_module (shared)
setenvif_module (shared)
version_module (shared)
slotmem_shm_module (shared)
unixd_module (shared)
status_module (shared)
autoindex_module (shared)
negotiation_module (shared)
dir_module (shared)
actions_module (shared)
userdir_module (shared)
alias_module (shared)
php_module (shared)
proxy_module (shared)
proxy_fcgi_module (shared)
fcgid_module (shared)

If I am tring to open invoice.localhost it redirects it to invoice.localhost/setup and that success is shown in apache access log too. But geting error 404 Opject not found! (as screenshot shown)

In same machine I installed Wordpress and it worked well.

Hi,

@david do you have any thoughts?

@andry
I think you’ve got an error in the apache httpd.conf

Change

<FilesMatch \.php$>
    SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://invoice.localhost"
</FilesMatch>

to

<FilesMatch \.php$>
    SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost"
</FilesMatch>

Sockets always work with localhost (ie 127.0.0.1). I suspect that your host invoice.local host is assigned a different ip address

If this works, please change the subject to SOLVED: …

1 Like

At first it was localhost but same error.
I changed it back to localhost but still same error.

I paste here my http fcgid_module conf too

<IfModule fcgid_module>
    AddHandler php-fcgid .php
    AddType application/x-httpd-php .php
    Action php-fcgid /fcgid-bin/php-fcgid-wrapper
    ScriptAlias /fcgid-bin/ /srv/http/fcgid-bin/
    SocketPath /var/run/httpd/fcgidsock
    SharememPath /var/run/httpd/fcgid_shm
        # If you don't allow bigger requests many applications may fail (such as WordPress login)
        FcgidMaxRequestLen 536870912
        # Path to php.ini – defaults to /etc/phpX/cgi
        DefaultInitEnv PHPRC=/etc/php/
        # Number of PHP childs that will be launched. Leave undefined to let PHP decide.
        #DefaultInitEnv PHP_FCGI_CHILDREN 3
        # Maximum requests before a process is stopped and a new one is launched
        #DefaultInitEnv PHP_FCGI_MAX_REQUESTS 5000
    <Location /fcgid-bin/>
        SetHandler fcgid-script
        Options +ExecCGI
    </Location>
</IfModule>

I don’t have that module on any of my servers (IN is running on 3 currently). Try removing it and see what happens.

Erased that module but nothing happened.

I enabled LoadModule rewrite_module modules/mod_rewrite.so and it will work.
In my case this work. Thanks to everyone to your thoughts.

1 Like