Web application could not be started by the Phusion Passenger application server – Redmine installation

I've installed a redmine web application on a centOs 7, with postgresql 9.1 and using passenger. When I access the redmine application, the following error appears:

We're sorry, but something went wrong.
The issue has been logged for investigation. Please try again later.

Error ID: f4adae6a Details:

Web application could not be started by the Phusion Passenger application server.

Please read the Passenger log file (search for the Error ID) to find the details of the error.

When I access the erro_log file at /var/log/httpd/ it is like this:

[ E 2018-05-25 16:28:01.7581 24316/Td age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /opt/redmine: An operating system error occurred while preparing to spawn an application process: Cannot create FIFO file /tmp/passenger.spawn.XXXXCTqsz4/response/finish: Permission denied (errno=13)
  Error ID: f4adae6a
  Error details saved to: /tmp/passenger-error-H1zmwo.html

[ E 2018-05-25 16:28:01.7609 24316/T6 age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 1-2] Cannot checkout session because a spawning error occurred. The identifier of the error is f4adae6a. Please see earlier logs for details about the error.

It seems that, first of all, apache is not logging the error at /tmp/passenger-error-H1zmwo.html as it was supposed to do.

I've already tried to loossing the permissions to the /opt/redmine using the following guide HERE

I'm on redmine 3.4.3, ruby 2.3.1 and rails 4.2.8. Passenger 5.3.1

Do'nt know what to do anymore. Appreciate a little help. Any more info please ask me.

Apache port forward to subdomain not working (tried various SO solutions)

I want to run an app on port 5000 and access it at app.mydomain.com.

I've tried the solutions I've found (basically identical), but still not working for me. How to diagnose?

https://serverfault.com/questions/195611/how-do-i-redirect-subdomains-to-a-different-port-on-the-same-server?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

https://serverfault.com/questions/857680/port-to-subdomain-in-apache/864748?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

https://askubuntu.com/questions/786564/redirect-port-5000-osrm-a-subdomain-in-apache2/786565?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

https://freedif.org/how-to-redirect-a-port-to-a-sub-domain-proxypass

[email protected]:/etc/apache2/sites-available$ cat 000-default.conf

ServerAdmin [email protected]
ServerName www.balterbox.space
DocumentRoot /var/www/html

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /var/www/html>
        AllowOverride None
        Order allow,deny
        allow from all
        Options +ExecCGI
        AddHandler cgi-script .pl .php .py .p1 .p2 .sh
</Directory>

<VirtualHost *:80>
        ServerAdmin [email protected]
        ServerName flask.balterbox.space
        ServerAlias flask.balterbox.space
        ProxyRequests Off

        #ProxyPass / http://localhost:5000/
        <Location />
                ProxyPreserveHost On
                ProxyPass http://localhost:5000/
                ProxyPassReverse http://localhost:5000/
        </Location>
     # Uncomment the line below if your site uses SSL.
     #SSLProxyEngine On
</VirtualHost>
[email protected]:/etc/apache2/sites-available$ sudo apachectl restart
[email protected]:/etc/apache2/sites-available$ curl localhost:5000
Hello [email protected]:/etc/apache2/sites-available$ curl flask.localhost
Hello [email protected]:/etc/apache2/sites-available$ curl balterbox.space:5000
curl: (7) Failed to connect to balterbox.space port 5000: Connection refused
[email protected]:/etc/apache2/sites-available$ curl flask.balterbox.space
curl: (6) Could not resolve host: flask.balterbox.space

Also, if I put the virtual host in a separate file such as flask.conf and a2ensite flask and restart apache, then even curl flask.localhost fails.

EDIT

I just tried adding

138.197.205.133 balterbox.space
138.197.205.133 flask.balterbox.space

to /etc/hosts and now curl works as expected:

[email protected]:/etc/apache2/sites-available$ curl flask.balterbox.space
Hello [email protected]:/etc/apache2/sites-available$

but I still get a name server error when visiting flask.balterbox.space.

Edit 2

I did update the DNS entry on DigitalOcean

digital ocean dns entry for flask.balterbox.space

Apache port forward to subdomain not working (tried various SO solutions)

I want to run an app on port 5000 and access it at app.mydomain.com.

I've tried the solutions I've found (basically identical), but still not working for me. How to diagnose?

https://serverfault.com/questions/195611/how-do-i-redirect-subdomains-to-a-different-port-on-the-same-server?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

https://serverfault.com/questions/857680/port-to-subdomain-in-apache/864748?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

https://askubuntu.com/questions/786564/redirect-port-5000-osrm-a-subdomain-in-apache2/786565?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

https://freedif.org/how-to-redirect-a-port-to-a-sub-domain-proxypass

[email protected]:/etc/apache2/sites-available$ cat 000-default.conf

ServerAdmin [email protected]
ServerName www.balterbox.space
DocumentRoot /var/www/html

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<Directory /var/www/html>
        AllowOverride None
        Order allow,deny
        allow from all
        Options +ExecCGI
        AddHandler cgi-script .pl .php .py .p1 .p2 .sh
</Directory>

<VirtualHost *:80>
        ServerAdmin [email protected]
        ServerName flask.balterbox.space
        ServerAlias flask.balterbox.space
        ProxyRequests Off

        #ProxyPass / http://localhost:5000/
        <Location />
                ProxyPreserveHost On
                ProxyPass http://localhost:5000/
                ProxyPassReverse http://localhost:5000/
        </Location>
     # Uncomment the line below if your site uses SSL.
     #SSLProxyEngine On
</VirtualHost>
[email protected]:/etc/apache2/sites-available$ sudo apachectl restart
[email protected]:/etc/apache2/sites-available$ curl localhost:5000
Hello [email protected]:/etc/apache2/sites-available$ curl flask.localhost
Hello [email protected]:/etc/apache2/sites-available$ curl balterbox.space:5000
curl: (7) Failed to connect to balterbox.space port 5000: Connection refused
[email protected]:/etc/apache2/sites-available$ curl flask.balterbox.space
curl: (6) Could not resolve host: flask.balterbox.space

Also, if I put the virtual host in a separate file such as flask.conf and a2ensite flask and restart apache, then even curl flask.localhost fails.

EDIT

I just tried adding

138.197.205.133 balterbox.space
138.197.205.133 flask.balterbox.space

to /etc/hosts and now curl works as expected:

[email protected]:/etc/apache2/sites-available$ curl flask.balterbox.space
Hello [email protected]:/etc/apache2/sites-available$

but I still get a name server error when visiting flask.balterbox.space.

Edit 2

I did update the DNS entry on DigitalOcean

digital ocean dns entry for flask.balterbox.space

PHP – Uploaded file cannot be accessed/not found after it was uploaded

I am using this Simple-Ajax-Uploader plugin to upload files, then I used This PHP library to handle the processing of the files, to do things like generating random file names, resizing and specifying a directory to save the files, etc.

Here's the code:

<?php
require('../classes/class.upload.php');
require('../classes/User.php');

//Process a file uploaded via XMLHttpRequest
$handle = new upload($_FILES['uploadfile']['tmp_name']);
if ($handle->uploaded) {
    $handle->file_new_name_body = User::generateRandomString();
    $handle->image_resize = true;
    $handle->image_x = 360;
    $handle->image_ratio_y = true;
    $handle->process('temp-uploads');
    if ($handle->processed) {
        echo json_encode(array('success' => true, 'newfilename' => $handle->file_dst_name));
        $handle->clean();
    } else {
        exit(json_encode(array('success' => false, 'msg' => $handle->error))); 
    }
}

Well, the file will upload successfully but somehow it becomes inaccessible via any web page, it's also inaccessible if I try to access the "site-name.com/directory-name/filename.jpg" on the browser. It shows 404 Not found.

I also thought it could be file permission issues, but after giving the uploaded files including their directory) all possible permissions, they are still 404 Not Found. Right now, files uploaded by ajax are visible in cPanel file manager but no accessible in URL.

Finally, out of curiosity, I uploaded another file directly to the server via cPanel and that one was accessible, but the others still mysteriously remain inaccessible with 404 Not Found. I also renamed one the inaccessible files to test.jpg, but it remains inaccessible. I tried to search for similar problems here but can't find one.

Please what is going wrong here?

PHP – Uploaded file cannot be accessed/not found after it was uploaded

I am using this Simple-Ajax-Uploader plugin to upload files, then I used This PHP library to handle the processing of the files, to do things like generating random file names, resizing and specifying a directory to save the files, etc.

Here's the code:

<?php
require('../classes/class.upload.php');
require('../classes/User.php');

//Process a file uploaded via XMLHttpRequest
$handle = new upload($_FILES['uploadfile']['tmp_name']);
if ($handle->uploaded) {
    $handle->file_new_name_body = User::generateRandomString();
    $handle->image_resize = true;
    $handle->image_x = 360;
    $handle->image_ratio_y = true;
    $handle->process('temp-uploads');
    if ($handle->processed) {
        echo json_encode(array('success' => true, 'newfilename' => $handle->file_dst_name));
        $handle->clean();
    } else {
        exit(json_encode(array('success' => false, 'msg' => $handle->error))); 
    }
}

Well, the file will upload successfully but somehow it becomes inaccessible via any web page, it's also inaccessible if I try to access the "site-name.com/directory-name/filename.jpg" on the browser. It shows 404 Not found.

I also thought it could be file permission issues, but after giving the uploaded files including their directory) all possible permissions, they are still 404 Not Found. Right now, files uploaded by ajax are visible in cPanel file manager but no accessible in URL.

Finally, out of curiosity, I uploaded another file directly to the server via cPanel and that one was accessible, but the others still mysteriously remain inaccessible with 404 Not Found. I also renamed one the inaccessible files to test.jpg, but it remains inaccessible. I tried to search for similar problems here but can't find one.

Please what is going wrong here?

Load domain from a sub folder

I am new to windows hosting...

I have a hosting with 3 domains added to it. This is what I want to achieve:

My Main system url is http://xxx.xx.xx.x/winhost/hrm_test/

www.mydomain1.co.uk =>  http://xxx.xx.xx.x/winhost/hrm_test/STAFF_Area/*
www.mydomain2.co.uk =>  http://xxx.xx.xx.x/winhost/hrm_test/reports_manager/*
www.mydomain3.co.uk =>  http://xxx.xx.xx.x/winhost/hrm_test/support_team/*

the subfolders are not actually existing folders but post variables changed using web.config... is it possible to have addon domains to always request these subfolders

Load domain from a sub folder

I am new to windows hosting...

I have a hosting with 3 domains added to it. This is what I want to achieve:

My Main system url is http://xxx.xx.xx.x/winhost/hrm_test/

www.mydomain1.co.uk =>  http://xxx.xx.xx.x/winhost/hrm_test/STAFF_Area/*
www.mydomain2.co.uk =>  http://xxx.xx.xx.x/winhost/hrm_test/reports_manager/*
www.mydomain3.co.uk =>  http://xxx.xx.xx.x/winhost/hrm_test/support_team/*

the subfolders are not actually existing folders but post variables changed using web.config... is it possible to have addon domains to always request these subfolders

Block EU countries to access my site via .htaccess?

Hi i have basic HTML site with a few pages. I want to block access from EU countries via .htaccess file i have into my root dir. I inserted this code on top of htaccess file, but seems that not make any changes.

<ifModule mod_geoip.c>

GeoIPEnable On
# Add countries you wish to deny here

SetEnvIf GEOIP_COUNTRY_CODE AL DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE AD DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE AM DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE AT DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE AM DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE AZ DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE BY DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE BE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE BA DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE BG DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE HR DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE CY DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE CZ DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE DK DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE EE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE FI DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE FR DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE GE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE DE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE GR DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE HU DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE IS DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE IE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE IT DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE KZ DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE LV DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE LI DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE LT DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE LU DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE MK DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE MT DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE MD DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE MC DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE ME DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE NL DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE NO DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE PL DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE PT DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE RO DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE RU DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE SM DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE RS DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE SK DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE SI DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE ES DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE SE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE CH DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE TR DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE UA DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE GB DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE VA DenyCountry
Allow from all

Deny from env=DenyCountry

</ifModule>

Can someone to help me with this? Maybe not works due to mod_geoip.c is not enabled as module into cPanel?

Block EU countries to access my site via .htaccess?

Hi i have basic HTML site with a few pages. I want to block access from EU countries via .htaccess file i have into my root dir. I inserted this code on top of htaccess file, but seems that not make any changes.

<ifModule mod_geoip.c>

GeoIPEnable On
# Add countries you wish to deny here

SetEnvIf GEOIP_COUNTRY_CODE AL DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE AD DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE AM DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE AT DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE AM DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE AZ DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE BY DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE BE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE BA DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE BG DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE HR DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE CY DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE CZ DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE DK DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE EE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE FI DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE FR DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE GE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE DE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE GR DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE HU DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE IS DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE IE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE IT DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE KZ DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE LV DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE LI DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE LT DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE LU DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE MK DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE MT DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE MD DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE MC DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE ME DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE NL DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE NO DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE PL DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE PT DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE RO DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE RU DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE SM DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE RS DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE SK DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE SI DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE ES DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE SE DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE CH DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE TR DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE UA DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE GB DenyCountry

SetEnvIf GEOIP_COUNTRY_CODE VA DenyCountry
Allow from all

Deny from env=DenyCountry

</ifModule>

Can someone to help me with this? Maybe not works due to mod_geoip.c is not enabled as module into cPanel?

Apache and Tomcat conflict in VPS

First time am hosting my site in VPS server. Facing below problems. Can anyone please guide me on this.

VPS server defaultly installed apache for webmail.domainname.com . I have installed tomcat server in vps and deployed war file in it.

Both apache and tomcat is listening on same port ( 80 & 443 )

So unable to access my domain name with Https.

I have added the below connector in server.xml

<Connector port="443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" SSLEnabled="true" clientAuth="false" sslProtocol="TLS" keyAlias="server" keystoreFile="test.jks" keystorePass="changeit" />

Just another Blog Hosting Sites site