Forum

Server not able to execute php files with PHP7.0-FPM socket instead it is downloading that php file

David
25 November 2017, 14:31
I am using ubuntu 16.04
this is my hiawatha.conf settings
FastCGIserver {
FastCGIid = PHP7
ConnectTo = /run/php/php7.0-fpm.sock
Extension = php
}

The PHP7.0-FPM is also listening to /run/php/php7.0-fpm.sock
I don't understand what happening inside please elaborate.
Thanks
Hugo
David
25 November 2017, 14:42
Normal CGI is working perfectly
Hugo Leisink
25 November 2017, 22:05
Have you set UseFastCGI option for your (virtual) host?
David
26 November 2017, 06:51
Ok Hugo now i have added virtual host and gave host name www.newakhil.com. This server set up is in amazon web services. Now i typed the host name in browser and it is not loading index.html file. This is my configuration i gave all necessary permissions to hiawatha.
# GENERAL SETTINGS
ServerId = www-data
ConnectionsTotal = 1000
ConnectionsPerIP = 25
SystemLogfile = /usr/local/var/log/hiawatha/system.log
GarbageLogfile = /usr/local/var/log/hiawatha/garbage.log

# BINDING
Binding {
Port = 80
}

# CGI SETTINGS
FastCGIserver {
FastCGIid = PHP7
ConnectTo = /run/php/php7.0-fpm.sock
Extension = php
}

# DEFAULT WEBSITE
Hostname = 127.0.0.1
WebsiteRoot = /usr/local/var/www/hiawatha
StartFile = index.html
AccessLogfile = /usr/local/var/log/hiawatha/access.log
ErrorLogfile = /usr/local/var/log/hiawatha/error.log

# VIRTUAL HOST
VirtualHost {
Hostname = www.newakhil.com
WebsiteRoot =/usr/local/var/www/newakhil
AccessLogfile =/usr/local/var/log/newakhil/access.log
ErrorLogfile =/usr/local/var/log/newakhil/error.log
TimeForCGI = 5
UseFastCGI = PHP7
# UseToolkit = banshee
# UseDirectory = static, files
}

Thanks
Hugo
Hugo Leisink
26 November 2017, 07:24
I don't know how your website works, so I don't know what settings are missing. Have you read the HOWTO pages? All information needed to set up your webserver is there.
David
27 November 2017, 11:38
Thanks for response Hugo. Sorted the problem and now its working perfectly alright.
This topic has been closed.