harshamv's avatar

Using .test domain for development in Ubuntu

We are developing multiple subdomain based namespaces in our app so we want to have a local domain to be able to use a subdomain in our development.

I am doing the following configuration in the apache available sites but not able to serve the app in the browser.

<VirtualHost *:80>
    ServerAlias skreem.test
    DocumentRoot /home/admini/Desktop/skreemProduct/public/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
0 likes
11 replies
harshamv's avatar

@sinnbeck we will have both. but am not able to get the base domain itself to work.

Sinnbeck's avatar

Ok. What error are you getting?

Do you get an error in /var/log/apache2/error.log ?

harshamv's avatar

I added the following code and it worked for the main domain. Now am tying to get the subdomain to work

<Directory /home/admini/Desktop/skreemProduct/>
        AllowOverride All
</Directory>
Sinnbeck's avatar
<VirtualHost *:80>
    ServerName skreem.test
    ServerAlias *.skreem.test
    DocumentRoot /home/admini/Desktop/skreemProduct/public/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /home/admini/Desktop/skreemProduct/>
        AllowOverride All
</Directory>
</VirtualHost>
harshamv's avatar

I have the following but my subdomain still keeps loading and doesnt hit the laravel app.

<VirtualHost *:80>
    ServerName skreem.local
    ServerAlias *.skreem.local
    DocumentRoot /var/www/html/multi-auth/public

    <Directory /var/www/html/multi-auth>
        AllowOverride All
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/skreem-local-error.log
    CustomLog ${APACHE_LOG_DIR}/skreem-local-access.log combined
</VirtualHost>
Sinnbeck's avatar

Remember to add some context to your replies. For example

"After changing to this it still works with the main domain but when I try using a subdomain, I get the follow error "...". Also my apache2 error logs are still empty"

Sinnbeck's avatar

So no data in the error.log file? And the browser just loads forever without any error? Is that correctly understood?

Please or to participate in this conversation.