0

I'm trying to install processmaker on my local machine, i create /opt directory and paste this php script into that, not i should defin virtual host on my ubuntu os, for doing this action i have this apache configuration into /etc/apache2/sites-available/ as pmos.conf named which i want to use 127.0.0.1:81 to opening /opt/processmaker/workflow/public_html path

<VirtualHost *:81>
    ServerAdmin admin@example.com
    ServerName processmaker.dev
    ServerAlias www.processmaker.dev

    DocumentRoot /opt/processmaker/workflow/public_html
    DirectoryIndex index.html index.php

    <Directory "/opt/processmaker/workflow/public_html">
       AddDefaultCharset UTF-8
       AllowOverRide none
       Options FollowSymlinks
       Order allow,deny
       Allow from all
       RewriteEngine on
       RewriteRule ^.*/(.*)$ sysGeneric.php [NC,L]
       AddOutputFilterByType DEFLATE text/html
    </Directory>
</VirtualHost>

and /etc/hosts content is:

127.0.0.1          localhost
127.0.1.1          pishguy
127.0.0.1          processmaker.dev
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

after restarting apache

sudo systemctl reload apache2

i dont get any error on shell, but typing 127.0.0.1:81 i get this error on FireFox:

Unable to connect
Firefox can’t establish a connection to the server at 127.0.0.1:81.
Tommiie
  • 5,627
  • 2
  • 12
  • 46
DolDurma
  • 103
  • 1
  • 7
  • Can you try this from a shell: `telnet localhost 81`? Does it give any output? – Daniele Santi Sep 04 '18 at 13:46
  • @MrShunz i get this error: `telnet: Unable to connect to remote host: Connection refused` – DolDurma Sep 04 '18 at 14:02
  • Why port 81? If you add a dns entry anyway there is no reason not to keep port 80. – Gerald Schneider Sep 04 '18 at 14:14
  • @GeraldSchneider after change `81` to `80` i get this error: `Your connection is not secure. processmaker.dev uses an invalid security certificate.` and url can't open – DolDurma Sep 04 '18 at 14:18
  • If you configured SSL on port 80 you should fix that, that belongs on port 443. Self signed certificates are normal on localhost, they can be ignored. And you have to connect using your dns name for the virtualhost to work, not the IP. – Gerald Schneider Sep 04 '18 at 14:26
  • @GeraldSchneider i can't ignore that, how can i fix that? – DolDurma Sep 04 '18 at 14:28
  • We can't tell you that without seeing the rest of your config. But since this is obviously a development environment your question is off topic for this site. It will be closed and deleted in due course. – Gerald Schneider Sep 04 '18 at 14:34

1 Answers1

1

Looks like Apache isn't listening to port 81.

Try, instead of reload to restart apache2 process:

`systemctl restart apache2`

Edit as per comment

You should add the directive

Listen 81

to /etc/apache2/ports.conf, too (or add it to your pmos.conf just before <VirtualHost *:81>).

Daniele Santi
  • 2,529
  • 1
  • 25
  • 22
  • 1
    I don't see any `listen 81` directive either. – Gerald Schneider Sep 04 '18 at 14:13
  • @Mr Shunz for `http://127.0.0.1:81/` url i get `Forbidden You don't have permission to access / on this server.` error and for `processmaker.dev` url i get `Your connection is not secure` error, I'm not sure why after opening `processmaker.dev` i have `https://processmaker.dev/` url on addressbar – DolDurma Sep 04 '18 at 14:27
  • @DolDurma this is another kind of problem. Do you have `mod_php` installed? Also make sure `mod_rewrite` is enabled (`a2enmod rewrite` if using a Debian based distro). – Daniele Santi Sep 04 '18 at 14:33
  • @MrShunz yes, i dont have any problem for any other php scripts – DolDurma Sep 04 '18 at 14:45
  • @DolDurma Might be a permission problem then. Is `/opt/processmaker/workflow/public_html` accessible by apache process? – Daniele Santi Sep 04 '18 at 14:47
  • @MrShunz problem is not permission, i think problem is ssl on localhost which i should fix that `This site uses HTTP Strict Transport Security (HSTS) to specify that Firefox may only connect to it securely. As a result, it is not possible to add an exception for this certificate.` – DolDurma Sep 04 '18 at 14:53
  • @MrShunz `processmaker.dev uses an invalid security certificate. The certificate is not trusted because it is self-signed. The certificate is only valid for .` – DolDurma Sep 04 '18 at 14:55