Jump to content

When I Visit My Url I Get A Directory Of Files?


unemployment

Recommended Posts

D'oh! You're right, Jessica. I didn't even look at what the domain was. :stoopid:

 

So, before I go off for a (apparently, much needed) break. Could it be that the OP has two different configurations for the domains, one which uses "index.php" as a DirectoryIndex, and the other not? In any case, I'd set up a forwarding from http://domain.com to http://www.domain.com

Link to comment
Share on other sites

I guess the question is does OP see his site properly at the www url, or what? Because that's the impression I got, which would indicate he does have an index.php and php is working.

 

Hey guys, the domain is actually http://trekeffect.com which shows the directory structure. The thing is... my personal site, http://jasonbiondo.com has no issues. I checked the virtual hosts and both of them have the same contents. What am I missing?

Link to comment
Share on other sites

Ok for real, you have to focus on one question or another. Is it two separate domains, or is it a question about adding the 'www' subdomain?

 

The question is... going to http://trekeffect.com shows a server list but going to http://www.trekeffect.com shows the website, why?

 

My virtual host file:

 

<VirtualHost *:80>

DocumentRoot /var/www/trekeffect.com/trekeffect.com

ServerName www.trekeffect.com

ServerAlias trekeffect.com

 

<Directory />

Options FollowSymLinks

AllowOverride None

</Directory>

<Directory /var/www/>

Options Indexes FollowSymLinks MultiViews

AllowOverride ALL

Order allow,deny

allow from all

</Directory>

</VirtualHost>

Link to comment
Share on other sites

The apache man page shows the variables reversed:

<VirtualHost *:80>
  ServerName www.domain.tld
  ServerAlias domain.tld *.domain.tld
  DocumentRoot /www/domain
</VirtualHost>

 

That really shouldn't matter. I don't have this problem with pitchbig.com

 

virtual host:

 

<VirtualHost *:80>

DocumentRoot /var/www/pitchbig.com/pitchbig.com

ServerName www.pitchbig.com

ServerAlias pitchbig.com

 

<Directory />

Options FollowSymLinks

AllowOverride None

</Directory>

<Directory /var/www/>

Options Indexes FollowSymLinks MultiViews

AllowOverride ALL

Order allow,deny

allow from all

</Directory>

</VirtualHost>

Link to comment
Share on other sites

  • 3 weeks later...

<VirtualHost *:80>
ServerAdmin hostmaster@trekeffect.com

DocumentRoot /var/www/trekeffect.com/trekeffect.com
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/trekeffect.com/trekeffect.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html

ServerName trekeffect.com
ServerAlias *.trekeffect.com

RewriteEngine on
RewriteCond %{HTTP_HOST} !^(www).* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.([^\.]+)\.com
RewriteCond /var/www/%2/%2/%1 -d
RewriteRule ^(.*) /%1/$1 [L]
</VirtualHost>

 

Try this one on for size.

Edited by txmedic03
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.