I have set up a couple of sites on my computer to work on, through the virtual hosting of Apache.
I checked many threads but found no clear explanation on how to proceed, so after setting up the server I decided to open a thread (I already lost hours searching and reading...).
Well, It looks working... I can access the sites, but I cannot log in.
I must say that I didn't touch the db to go multi (before I had a single site only) so it's probably a db problem.
Actually, if I leave the files of the old site in the main htdocs dir, everything works fine with this installation.
But in htdocs/site1 and htdocs/site2, when I go to localhost/site1 or localhost/site2 I have access denied and I cannot even log in but I have the main front page of the sites!
OK in short the question is: what should I do after I have set up virtual hosts in Apache?
Comments
_
As well as sites/default, you just need an folder under /sites for the settings.php for each multisite site (so to speak), with the same name as the domain.
Pete.
Under /sites or under
Under /sites or under sites/default? Because it is there that stands settings.php, should I move it?
And what do you mean with the same name as the domain??? Should I rename it, in example, to settings_quanticc.com.php?????
Another thing: I see that in settings.php there are these lines of configuration:
$db_url = 'mysqli://root@localhost/db_1';
$db_prefix = '';
Should I work on different database to have less problem in future, when I'll need to transfer the sites from my machine to the public server?
I guess that I don't need prefix if I work on another db but I am not sure, but I'd need to set a prefix if I work in the same db, right?
In this case I'll prefer to work on another db, I can set up as many as I want at my home of course and I guess it would be easier to move the site later on.
_
The folders should be called sites/yourdomain1.com, stes/yourdomain2.com and so on.
Leave the existing settings.php in /default, but have a settings.php in each of the directories above to define the database for yourdomain1.com, yourdomain2.com and so forth.
Pete.
That's all? I am making new
That's all?
I am making new install of Drupal (before I just tried to COPY there) and it looks working! I am also creating new db for Drupal.
So I guess I CAN'T move a site to another dir, right?
In this case, how can I move the site I have in htdocs to htdocs/site1?
Thank you very much, Pete!
Oh and for the rest: thank you! I just created new databases and new Drupal installs and all works fine!
_
You can move the site by simply moving everything in htddocs to htdocs/site1 - make sure you copy .htaccess!
Then set the document root for your domains to htdocs/site1
Pete.
Yeah, that's simple! And then
Yeah, that's simple!
And then backup the db and upload it to remote server, ye? :D
Thank you man!