1

I am running hhvm on ubuntu14 with the following server.ini config:

server.ini

; php options

pid = /var/run/hhvm/pid

; hhvm specific 

;hhvm.server.port = 9000
hhvm.server.file.socket=/var/run/hhvm/hhvm.sock
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.log.use_log_file = true
hhvm.log.file = /var/log/hhvm/error.log
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc

I commented out the 9000 port line and added the file socket option. After this change, when I restart the service, it seems that hhvm appears to bind on port 80 as well (I am trying to run nginx on port 80). I could not find any config for hhvm where it explicitly binds on port 80. Any thoughts on how I can go about ensuring that hhvm does not use port 80.

php.ini

; php options
session.save_handler = files
session.save_path = /var/lib/hhvm/sessions
session.gc_maxlifetime = 1440

; hhvm specific 
hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.mysql.typed_results = false

I also do not see hhvm.sock in /var/run/hhvm.

Update When I comment tout the file socket and replace it with the port, hhvm binds to port 9000 instead of 80. I need to figure out the correct method of using hhvm with nginx (allowing nginx to run on port 80)

0

It should be hhvm.server.file_socket, not hhvm.server.file.socket.

0

I ended up using the port number as opposed to the file socket option and got it to work.

  • Can't you use both the port number and Unix socket? Unix socket is the preferred way to connect to the HHVM, since there is no TCP connection setup when making requests. – Tero Kilkanen Oct 4 '16 at 20:05
  • i thought so - but when I used the file socket, the hhvm process was binding on 0.0.0.0:80 (and nginx was not able to bind on port 80 failing to come up) – ali haider Oct 4 '16 at 20:14
  • Did you have both configured? That is, port 9000 and unix socket? – Tero Kilkanen Oct 4 '16 at 20:16
  • no, i was trying one or the other. Only when I tried file socket did the process bind on port 80 – ali haider Oct 4 '16 at 20:18
  • So, try configuring them both and see if Unix socket is available then. – Tero Kilkanen Oct 4 '16 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.