The main question is - is it possible?

suroxon

New Member
Joined
Dec 3, 2020
Messages
2
Reaction score
0
Credits
34
Hi guys.

Please don't be angry, I am pretty new in the linux world so I may ask some funny and unusual questions... Sorry in advance for that.

So... I was assigned with some tasks and here they are.

I am working on CentOS 8 distribution and I have two domains, first domain www.mydomain1.com and a second domain www.mydomain2.com, both domains are on the same IP address.

I have just one CentOS 8 server available and on this server I must to install three applications - Wordpress, Jitsi and Nextcloud with Collabora Online module. I already installed Wordpress with a normal install (not using docker) and is normally working on one domain (www.mydomain1.com). I have a plan to install Jitsi and Nextcloud on the same server with a docker, both on a second domain like www.mydomain2.com/nextcloud and www.mydomain2.com/jitsi.

So my question is... Is that possible?

Those tasks are just for the educational purposes so the thing is not permanent and I would do things differently in a normal real world circumstances. ;-)

Thank you for your answers in advance.

Best regards

suroxon
 


I'm not entirely sure if you can since you only have one ip address.

These links may enlighten you:


HTH
 
Yes that is possible. DNS is just pointing a name to an ip you can point as many domain names to na ip adress as you like. And as for your setup:
www.domain1.com -> wordpress
www.domain2.com/nextcloud
www.domain2.com/jetsi
That should also work also work, although I don't know how jitsi works if it has a web frontend it should work and otherwise they should have documentation on how to make it work.
 
Hi guys.

Thank you for your answers.

I decided I will install Wordpress and Nextcloud on one domain as edusrv55a.domain.com/wordpress and edusrv55a.domain.com/nextcloud and just Jitsi on a second domain (edusrv55b.domain.com) but I have further problem.

I successfully installed Nextcloud which is up and running on edusrv55a.domain.com/nextcloud but I can't install Wordpress on edusrv55a.domain.com/wordpress, it just displays Nextcloud "Internal Server Error".

I tried with different .conf files. Here are current config files for Nextcloud (which is running):

Code:
<VirtualHost *:80>
  DocumentRoot /var/www/nextcloud/
  ServerName  edusrv55a.t-2.com

  Alias /nextcloud "/var/www/nextcloud"

  <Directory /var/www/nextcloud/>
    Require all granted
    AllowOverride All
    Options FollowSymLinks MultiViews

    <IfModule mod_dav.c>
      Dav off
    </IfModule>

  </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =edusrv55a.t-2.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

And here is config file for Wordpress (I failed with installation):

Code:
<VirtualHost *:80>
  ServerAdmin root@localhost
  ServerName edusrv55a.t-2.com
  ServerAlias www.edusrv55a.t-2.com
  DocumentRoot /var/www/wordpress
  Alias /wordpress "/var/www/wordpress"

<Directory "/var/www/wordpress">
        Options FollowSymLinks MultiViews
        AllowOverride all
        Require all granted
</Directory>

ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
</VirtualHost>

I tried to setup Apache virtual host following this tutorial but I failed.

I have Nextcloud and Wordpress installed under those directories:

/var/www/wordpress/
/var/www/nextcloud/

I added additional directories for virtual hosts:

/etc/httpd/sites-available/
/etc/httpd/sites-enabled/

In those directories are the same .conf files (wordpress.conf , nextcloud.conf) as in /etc/httpd/conf.d/ directory.

What I am doing wrong?

Thank you for your answers in advance guys.

Best regards

suroxon
 
G'day suroxon and Welcome to linux.org

I cannot help with your topic, although you are in the best of hands with @f33dm3bits and @Alexzee

It is more than admirable that you are willing and able to help yourself, with the two members help

It brings a smile to our faces.
 
The error log should provide a clue as to what is going on or why it failed.
When you get a chance open the error log and post what it says.

/var/log/httpd/wordpress_error.log

Before installing Apache there are prerequisites that have to be ensured first.:)


Another link for setting up a virtual host on Centos 8:
To test your virtual host, you’ll have to create a phpinfo file to the document root directory.

 
You can do "name based", or "IP based" or "port based" virtual hosts in Apache.
Simply having two webroot directories won't help.
 
Hi guys.

Thank you for your answers.

I decided I will install Wordpress and Nextcloud on one domain as edusrv55a.domain.com/wordpress and edusrv55a.domain.com/nextcloud and just Jitsi on a second domain (edusrv55b.domain.com) but I have further problem.

I successfully installed Nextcloud which is up and running on edusrv55a.domain.com/nextcloud but I can't install Wordpress on edusrv55a.domain.com/wordpress, it just displays Nextcloud "Internal Server Error".

I tried with different .conf files. Here are current config files for Nextcloud (which is running):

Code:
<VirtualHost *:80>
  DocumentRoot /var/www/nextcloud/
  ServerName  edusrv55a.t-2.com

  Alias /nextcloud "/var/www/nextcloud"

  <Directory /var/www/nextcloud/>
    Require all granted
    AllowOverride All
    Options FollowSymLinks MultiViews

    <IfModule mod_dav.c>
      Dav off
    </IfModule>

  </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =edusrv55a.t-2.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

And here is config file for Wordpress (I failed with installation):

Code:
<VirtualHost *:80>
  ServerAdmin root@localhost
  ServerName edusrv55a.t-2.com
  ServerAlias www.edusrv55a.t-2.com
  DocumentRoot /var/www/wordpress
  Alias /wordpress "/var/www/wordpress"

<Directory "/var/www/wordpress">
        Options FollowSymLinks MultiViews
        AllowOverride all
        Require all granted
</Directory>

ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
</VirtualHost>

I tried to setup Apache virtual host following this tutorial but I failed.

I have Nextcloud and Wordpress installed under those directories:

/var/www/wordpress/
/var/www/nextcloud/

I added additional directories for virtual hosts:

/etc/httpd/sites-available/
/etc/httpd/sites-enabled/

In those directories are the same .conf files (wordpress.conf , nextcloud.conf) as in /etc/httpd/conf.d/ directory.

What I am doing wrong?

Thank you for your answers in advance guys.

Best regards

suroxon
These are unnecessary:
/etc/httpd/sites-available/
/etc/httpd/sites-enabled/

You can remove the line from httpd.conf: IncludeOptional sites-enabled/*.conf, als well as removing the directories sites-available and sites-enabled. Just place your virtualhosts(wordpress.conf and nextcloud.conf) in /etc/httpd/conf.d and restart apache. If you want to disable one just rename it to nextcloud.conf.disabled or create a directory disabled in /etc/httpd/conf.d/and move the virtualhost there and then restart apache. No need to make things unnecessary complicated for yourself when you first start out, you first have to learn what you are actually are doing before making it complicated. Don't forget your log file settings for your nextcloud virtualhost and that rewrite seems unnecessary, try disabling it by commenting it out so it looks like this
Code:
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =edusrv55a.t-2.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
 
Last edited:
Please don't be angry,

I see the others are helping you, and I'll add "learn about nameservers" to the list.

But, I wanted to touch on that comment you made.

It's true, we can be pretty rough on people - but it's generally only when they refuse to help themselves. We get angry when they've given us no information and expect us to provide the solution you think will work rather than something we know will work.

We get angry when they refuse to learn anything.

We get angry when they waste our time, more or less. We're all volunteers and we'd like our time to be used well. We'd like it to be beneficial.

We expect you to have searched, we expect you to know the details, we expect you to cooperate, we expect you to put effort in, and we expect you to help us help you.

Other than that, we're pretty happy and never angry.

Your post is a great one. You gave details, you let us know your objective, you continued helping yourself, etc... So, ain't nobody gonna be angry with you. Each and every one of us was new to Linux at one point in our lives.
 
Well said :)

@suroxon welcome to linux.org - if you get a chance when your subject here is resolved, consider popping over to Member Introductions and telling us a little of the suroxon story.

I am sure you will get a warm welcome, as we are a pretty friendly community here, I believe.

Cheers

Chris Turner
wizardfromoz
 
How did the topic go from apache virtualhosts to VPN?
 
where should i go for beginner question server?
There is an orange/yellow icon to the right hand side of that page that looks like.....
Screenshot from 2021-01-03 23-08-34.png


....click on that, and away you go.
Give it a title, and type away
 

Members online


Top