Server refused connection for websites on virtual hosting

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
homenas
New here
Posts: 5
Joined: Tue May 17, 2011 12:18 pm

Server refused connection for websites on virtual hosting

Post by homenas » Tue Feb 05, 2019 9:49 pm

Hi

I had websites running on my QNAP with virtual hosting. I was just starting and redid everything to have a clean start agian.
Now I have 2 virtual host defined, but get an error: server refused connection.

When I stop virtual hosting and upload wordpress under /web/ then I am redirected to the administration page of qnap.

I tried everything. Reset web service, reset PHP, delete web directory again, but nothing works.
Which analysis tools exist to find out what is wrong?

Thanks for your help,

Stafylocok
New here
Posts: 4
Joined: Thu Feb 09, 2017 6:18 pm

Re: Server refused connection for websites on virtual hosting

Post by Stafylocok » Thu Feb 07, 2019 1:37 am

Wow I'm so glad I found your post.
I'm experiencing exactly the same thing here.

I got in touch with the french support, we're trying to find a solution, which we haven't yet.


Please keep in touch if you find a solution from your side, I will as well.



I started from scratch so here is what I did :
Set my server on DHCP constant IP both on my router and on the Qnap
Re-directed port 80 and port 8081 on my router

Enabled the SQL server
Installed phpmyadmin
Created a database on phpmyadmin

Enabled web server
Made sure that ports were set up to 80 and 8081 for secure connection

Installed WordPress
Linked WordPress to my database on phpMyadmin

on my domain provider, I redirected my domain to my IP address.


At this point, everything should actually be "brand new". What I actually got is a redirect to my admin qnap page when I'm searching for both http://mydomain.com and httpS://mydomain.com

When trying to delete index.php I get a forbidden error on httpS://... and the servers tries to redirect to the admin page on http:// but takes too much time to respond.


I've started from scratch at least 8 to 10 times, nothing is working and I can't figure out what I'm doing wrong.

homenas
New here
Posts: 5
Joined: Tue May 17, 2011 12:18 pm

Re: Server refused connection for websites on virtual hosting

Post by homenas » Thu Feb 07, 2019 8:17 pm

Dear all,

I found a solution.
There were two errors.

First step:

[~] # /etc/init.d/Qthttpd.sh stop
...
[~] # cp /etc/default_config/apache.conf /etc/config/apache/apache.conf
[~] # /etc/init.d/Qthttpd.sh start
...

This is from another thread.

Then I saw that the subdirectories are not copied to the /web/.../ directories
Now it is working.

Regards,

Arthur

Stafylocok
New here
Posts: 4
Joined: Thu Feb 09, 2017 6:18 pm

Re: Server refused connection for websites on virtual hosting

Post by Stafylocok » Tue Feb 12, 2019 5:55 am

Hello Arthur,

Could you please add some lines about this? I am afraid I don't understand the way to fix the error with what you wrote.

Where did you write this?


I don't understand the error therefore I don't understand your solution :/

Staf

loujacob66
First post
Posts: 1
Joined: Mon Jun 17, 2013 11:51 pm

Re: Server refused connection for websites on virtual hosting

Post by loujacob66 » Sat Mar 02, 2019 2:52 am

I'm getting the same errors. Files are where they are supposed to be however, it seems that the contents of httpd-vhosts-user.conf are almost entirely ignored. I've checked to ensure that the file is included in the main httpd.conf files, and I've done some hand editing to test that different ports are listened to, etc, but for some reason, only the main host works, but none of the virtual ones.

Here are the contents of my config file; very simple:

NameVirtualHost *:80


<VirtualHost _default_:80>
DocumentRoot "/share/Web"
</VirtualHost>
<VirtualHost *:80>
<Directory "/share/Web">
Options FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ServerName www.xyz.dev
DocumentRoot "/share/Web/xyz"
</VirtualHost>

Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”