Trying to run symfony on subdomain

wizarduss

New member
Joined
May 1, 2017
Messages
2
I have been trying to get symfony to run, on a subdomain. However, after trying several solutions, I have no clue how I can fix the httpd.conf file to get it to work. I'm only getting "Apache is functioning normally" right now.

Would anyone have an idea as to what my httpd.conf should look like?

I created the httpd.conf file by setting up a custom template for directadmin.

This is what the part for this subdomain looks like (IP/Domain have been hidden):
Code:
<VirtualHost IP:443 >
		SSLEngine on
		SSLCertificateFile /usr/local/directadmin/data/users/admin/domains/DOMAIN.cert
		SSLCertificateKeyFile /usr/local/directadmin/data/users/admin/domains/DOMAIN.key
		SSLCACertificateFile /usr/local/directadmin/data/users/admin/domains/DOMAIN.cacert  
		ServerName www.sym.DOMAIN
		ServerAlias www.sym.DOMAIN sym.DOMAIN 
		ServerAdmin webmaster@DOMAIN
				DocumentRoot /home/admin/domains/DOMAIN/private_html/sym/web
		ScriptAlias /cgi-bin/ /home/admin/domains/DOMAIN/public_html/sym/cgi-bin/
		UseCanonicalName OFF
		<IfModule !mod_ruid2.c>
				SuexecUserGroup admin admin
		</IfModule>
		CustomLog /var/log/httpd/domains/DOMAIN.sym.bytes bytes
		CustomLog /var/log/httpd/domains/DOMAIN.sym.log combined
		ErrorLog /var/log/httpd/domains/DOMAIN.sym.error.log
		<FilesMatch "\.(inc|php|phtml|phps|php70)$">
				AddHandler "proxy:unix:/usr/local/php70/sockets/admin.sock|fcgi://localhost" .php70
		</FilesMatch>
				<Directory /home/admin/domains/DOMAIN/private_html/sym/web>
						AllowOverride None
						Order Allow,Deny
						Allow from All
						<IfModule mod_rewrite.c>
								Options -MultiViews
								RewriteEngine On
								RewriteCond %{REQUEST_FILENAME} !-f
								RewriteRule ^(.*)$ app.php [QSA,L]
						</IfModule>
		</Directory>
</VirtualHost>

The differences in here compared to a default subdomain generated by directadmin, are the addition of /web behind the documentroot, and the complete "directory" settings.
 
Hello,

The fact that you see "Apache is functioning normally" mean that either apache does not load your config with the virtual host or IP in DNS and IP in the virtual host are different.

First make sure that you set correct IP both in virtual host and DNS
Then check

Code:
apachectl -S 2>&1

output to make sure that you see sym.DOMAIN in results.
 
Sorry for the late reply, it seems my issue was with the redirect of http -> https in the end, once I fixed that it worked.

Thanks!
 
Back
Top